terrybroad/Learned-Sim-Autoencoder-For-Video-Frames

NameError: global name 'shuffle' is not defined

smd75jr opened this issue · 1 comments

I am unable to run the program with "--is_run True".

Full error:

Traceback (most recent call last):
  File "main.py", line 92, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "main.py", line 75, in main
    autoencoder.run(FLAGS)
  File "/home/smd75jr/autoencode/Learned-Sim-Autoencoder-For-Video-Frames/model.py", line 288, in run
    shuffle(data)
NameError: global name 'shuffle' is not defined

My mistake. I have fixed the bug by importing:

from random import shuffle

And moving the call for shuffle from run (which should be done in order) to train.