Closed tarunparmar closed 6 years ago
@tarunparmar: You need to change batch_indices = range(num_batches)
into batch_indices = list(range(num_batches))
.
thanks @raagas , that did help plus a few other changes by converting xrange
to range
and iteritems
to items
.
@tarunparmar: You need to change
batch_indices = range(num_batches)
intobatch_indices = list(range(num_batches))
.
Here the problem is with file in root directory
"/usr/lib/python3.6/random.py"
How can I overcome this?
Traceback (most recent call last):
File "train_c3d.py", line 342, in <module>
tf.app.run()
File "/home/apiiit-rkv/.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 "/home/apiiit-rkv/.local/lib/python3.6/site-packages/absl/app.py", line 299, in run
_run_main(main, args)
File "/home/apiiit-rkv/.local/lib/python3.6/site-packages/absl/app.py", line 250, in _run_main
sys.exit(main(argv))
File "train_c3d.py", line 338, in main
run_training()
File "train_c3d.py", line 257, in run_training
shuffle=True)
File "/home/apiiit-rkv/Desktop/C3D-tensorflow/input_data.py", line 61, in read_clip_and_label
random.shuffle(video_indices)
File "/usr/lib/python3.6/random.py", line 277, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: 'range' object does not support item assignment
Hi,
I had to convert the code to run on Python3. Mostly changed all print statements, thats it.
For line 202 in
model_rnn.py
I changed thexrange
torange
. But could not get it to work. Tried looking up for a fix but its something beyond my understanding I guess so thought of opening up an issue here.Any suggestions would be helpful. Thx.