UnrecognizedFlagError: Unknown command line flag 'eval_flow'

Carolmeir: <p>Hello,</p>
<p>I am getting this error while trying to run this part of the code.</p>
<blockquote>
<p>def main(unused_argv):<br>
if FLAGS.trace == “”:<br>
raise Exception(“OUT_DIR must be specified”)</p>
<pre><code>print('Constructing models and inputs.')

if FLAGS.mode == "depthflow":  # stage 3: train depth and flow together
    Model = Model_depthflow
    Model_eval = Model_eval_depthflow

    opt.eval_flow = True
    opt.eval_depth = True
    opt.eval_mask = True
elif FLAGS.mode == "depth":  # stage 2: train depth
    Model = Model_depth
    Model_eval = Model_eval_depth

    opt.eval_flow = True
    opt.eval_depth = True
    opt.eval_mask = False
elif FLAGS.mode == "flow":  # stage 1: train flow
    Model = Model_flow
    Model_eval = Model_eval_flow

    opt.eval_flow = True
    opt.eval_depth = False
    opt.eval_mask = False
elif FLAGS.mode == "stereo":
    Model = Model_stereo
    Model_eval = Model_eval_stereo

    opt.eval_flow = False
    opt.eval_depth = True
    opt.eval_mask = False
else:
    raise Exception("mode must be one of flow, depth, depthflow or stereo")
</code></pre>
</blockquote>
<p>This is the error I am getting:</p>
<blockquote>
<p>2020-02-18 10:16:13.466300: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘libnvinfer.so.5’; dlerror: libnvinfer.so.5: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.0/lib64:<br>
2020-02-18 10:16:13.466355: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘libnvinfer_plugin.so.5’; dlerror: libnvinfer_plugin.so.5: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.0/lib64:<br>
2020-02-18 10:16:13.466363: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.<br>
Constructing models and inputs.<br>
Traceback (most recent call last):<br>
File “main.py”, line 284, in <br>
tf.compat.v1.app.run()<br>
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/platform/app.py”, line 40, in run<br>
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)<br>
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/absl/app.py”, line 299, in run<br>
_run_main(main, args)<br>
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/absl/app.py”, line 250, in _run_main<br>
sys.exit(main(argv))<br>
File “main.py”, line 94, in main<br>
opt.eval_flow = True<br>
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/platform/flags.py”, line 88, in <strong>setattr</strong><br>
return self.<strong>dict</strong>[‘__wrapped’].<strong>setattr</strong>(name, value)<br>
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/absl/flags/_flagvalues.py”, line 499, in <strong>setattr</strong><br>
return self._set_unknown_flag(name, value)<br>
File “/home/kbdp5524/anaconda3/lib/python3.7/site-packages/absl/flags/_flagvalues.py”, line 375, in _set_unknown_flag<br>
raise _exceptions.UnrecognizedFlagError(name, value)<br>
absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag ‘eval_flow’</p>
</blockquote>
<p>Can anyone please tell me where I should correct? And, what is this error?</p>
<p>Thanks very much!</p>

ptrblck: <p>It seems you are using a Tensorflow model, while you’ve landed in the PyTorch discussion board. <img src="https://discuss.pytorch.org/images/emoji/apple/wink.png?v=9" title=":wink:" class="emoji" alt=":wink:"><br>
I would recommend to create a topic in their forum or StackOverflow, as you will most likely get a better answer there.</p>
<p>Based on the raised error, I would assume your passed argument should be one of the strings checked in the if-condition (e.g. <code>depthflow</code>, <code>depth</code>, etc.).</p>