Problem with "Train your first model" code
See original GitHub issueHi,
I successfully installed VSR. However when I try to run
python run.py --model=srcnn --dataset=91-image --test=set14
I encounter an error. The traceback reads:
WARNING:tensorflow:From /home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. WARNING:tensorflow:From /home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/SuperResolution.py:118: to_float (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead. WARNING:tensorflow:From /home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Util/Utility.py:139: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.cast instead. 2019-04-25 11:22:29.679578: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 2019-04-25 11:22:29.700841: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3100230000 Hz 2019-04-25 11:22:29.701348: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x55cebbc55a80 executing computations on platform Host. Devices: 2019-04-25 11:22:29.701364: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): <undefined>, <undefined> INFO:tensorflow:Fitting: SRCNN frames is empty. [size=12800] | 2019-04-25 11:22:29 | Epoch: 1/50 | LR: 0.01 | 0batch [00:00, ?batch/s] frames is empty. [size=10] Test: 0it [00:00, ?it/s]
Traceback (most recent call last): File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/client/session.py”, line 1334, in _do_call return fn(*args) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/client/session.py”, line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/client/session.py”, line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: You must feed a value for placeholder tensor ‘input/lr’ with dtype uint8 and shape [?,?,?,?] [[{{node input/lr}}]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “run.py”, line 46, in <module> tf.app.run(main) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/platform/app.py”, line 125, in run _sys.exit(main(argv)) File “run.py”, line 42, in main return Run.run(*args[0][1:], **additional_functions) File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Tools/Run.py”, line 319, in run t.fit([train_loader, val_loader], train_config) File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/Trainer.py”, line 356, in fit self.fn_train_each_epoch() File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/Trainer.py”, line 272, in fn_train_each_epoch v.summary_writer.add_summary(self.model.summary(), v.global_step) File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/SuperResolution.py”, line 216, in summary feed_dict=self.feed_dict) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/client/session.py”, line 929, in run run_metadata_ptr) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/client/session.py”, line 1152, in _run feed_dict_tensor, options, run_metadata) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/client/session.py”, line 1328, in _do_run run_metadata) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/client/session.py”, line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: You must feed a value for placeholder tensor ‘input/lr’ with dtype uint8 and shape [?,?,?,?] [[node input/lr (defined at /home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/SuperResolution.py:117) ]]
Caused by op ‘input/lr’, defined at: File “run.py”, line 46, in <module> tf.app.run(main) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/platform/app.py”, line 125, in run _sys.exit(main(argv)) File “run.py”, line 42, in main return Run.run(*args[0][1:], **additional_functions) File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Tools/Run.py”, line 305, in run with trainer(model, root, verbosity) as t: File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/Trainer.py”, line 109, in enter self._startup() File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/Trainer.py”, line 103, in _startup self.model.compile() File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/SuperResolution.py”, line 84, in compile self.build_graph() File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Models/Srcnn.py”, line 43, in build_graph super(SRCNN, self).build_graph() File “/home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/SuperResolution.py”, line 117, in build_graph name=‘input/lr’)) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py”, line 2077, in placeholder return gen_array_ops.placeholder(dtype=dtype, shape=shape, name=name) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py”, line 5791, in placeholder “Placeholder”, dtype=dtype, shape=shape, name=name) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py”, line 788, in _apply_op_helper op_def=op_def) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/util/deprecation.py”, line 507, in new_func return func(*args, **kwargs) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/framework/ops.py”, line 3300, in create_op op_def=op_def) File “/home/david/miniconda/lib/python3.7/site-packages/tensorflow/python/framework/ops.py”, line 1801, in init self._traceback = tf_stack.extract_stack()
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor ‘input/lr’ with dtype uint8 and shape [?,?,?,?] [[node input/lr (defined at /home/david/SAT-FIRE/Codes/Data Fusion/SCRNN with Tensorflow Example/VideoSuperResolution-master/VSR/Framework/SuperResolution.py:117) ]]
Any ideas what is causing this problem?
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Thanks for your replies. You are both correct.
For the complete novices, like me, who are also having this problem, I solved the problem by.
Things seem to be running fine for me now.
Usually it is that the dataset is not found at the expected location, so no image/frame can be loaded.