hx173149 / C3D-tensorflow

C3D is a modified version of BVLC tensorflow to support 3D ConvNets.
MIT License
588 stars 265 forks source link

UnboundLocalError: local variable 'img_datas' referenced before assignment #123

Closed LW-CVer closed 4 years ago

LW-CVer commented 4 years ago

@hx173149 hi,how to solve the problem?

rocksyne commented 4 years ago

@hx173149 hi,how to solve the problem?

Please elaborate on your problem. Usually if you get a "variable referenced before assignment" error, it simply means that the variable has not been defined or initialized to something.

LW-CVer commented 4 years ago

@hx173149 hi,how to solve the problem?

Please elaborate on your problem. Usually if you get a "variable referenced before assignment" error, it simply means that the variable has not been defined or initialized to something.

but i don't change the code,when i run the "python3 train_c3d_ucf101.py" error is: Traceback (most recent call last): File "train_c3d_ucf101.py", line 264, in tf.app.run() File "/usr/local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "/usr/local/lib/python3.6/site-packages/absl/app.py", line 299, in run _run_main(main, args) File "/usr/local/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main sys.exit(main(argv)) File "train_c3d_ucf101.py", line 261, in main run_training() File "train_c3d_ucf101.py", line 220, in run_training shuffle=True File "/home/ai/lw/C3D-tensorflow/lw/C3D-tensorflow/input_data.py", line 103, in read_clip_and_label data.append(lw_datas) UnboundLocalError: local variable 'lw_datas' referenced before assignment