LoSealL / VideoSuperResolution

A collection of state-of-the-art video or single-image super-resolution architectures, reimplemented in tensorflow.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems with the first training

Undercut opened this issue · comments

commented

Hey, Thank you for your sharing and I was still learning your project.
I can't successfully finish the training, it throws an error "The flag 'v' is defined twice. First from absl.logging, Second from VSR.Tools.Run. " I was very confused about it, can you help to solve that? Thank you so much.

D:\VideoSuperResolution-master\Train>python run.py --model=srcnn --dataset=91-image --test=set4
Traceback (most recent call last):
File "run.py", line 21, in
from VSR.Tools import Run
File "d:\videosuperresolution-master\VSR\Tools\Run.py", line 74, in
tf.flags.DEFINE_bool('v', False, help="show verbose info")
File "C:\Users\x50\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\platform\flags.py", line 58, in wrapper
return original_function(*args, **kwargs)
File "C:\Users\x50\AppData\Local\Programs\Python\Python37\lib\site-packages\absl\flags_defines.py", line 268, in DEFINE_boolean
flag_values, module_name)
File "C:\Users\x50\AppData\Local\Programs\Python\Python37\lib\site-packages\absl\flags_defines.py", line 104, in DEFINE_flag
fv[flag.name] = flag
File "C:\Users\x50\AppData\Local\Programs\Python\Python37\lib\site-packages\absl\flags_flagvalues.py", line 430, in setitem
raise _exceptions.DuplicateFlagError.from_flag(name, self)
absl.flags._exceptions.DuplicateFlagError: The flag 'v' is defined twice. First from absl.logging, Second from VSR.Tools.Run. Description from first occurrence: Logging verbosity level. Messages logged at this level or lower will be included. Set to 1 for debug logging. If the flag was not set or supplied, the value will be changed from the default of -1 (warning) to 0 (info) after flags are parsed.

Did you manage to sold this problem? I get the same problem after setting up a GPU after previously having no problems running the code on the CPU only.

commented

@dtlloyd Actually I have solved this problem.
Change line 74 in the VSR/tools/run.py:
tf.flags.DEFINE_bool('v', False, help="show verbose info")
into:
tf.flags.DEFINE_bool('g', False, help="show verbose info")
For me, it works well.

I guess it is possible because the version of Tensorflow, I meet this problem in Tensorflow 1.4 or higher. Hope this would be helpful to you.

Thanks for your reply. I did that same thing myself. I have managed to get things working now.

absl.flags._exceptions.DuplicateFlagError: The flag 'training_file' is defined twice. First from train_JDDA.py, Second from train_JDDA.py. Description from first occurrence: Training dataset file
please how to fixit? any help?