Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3? #31

Open
machuck opened this issue Jul 14, 2017 · 1 comment
Open

Python3? #31

machuck opened this issue Jul 14, 2017 · 1 comment

Comments

@machuck
Copy link

machuck commented Jul 14, 2017

According to the readme, it supports both python 2 and 3. But using python3 to run the first example (train) in the readme cause an error about xrange/range. So the question is how does it support python3? Using 2to3 is tested to be okay? TIA!

@benjisympa
Copy link

Hi,
I try the code with Python 3, I've also changed the xrange to range but I have this problem :

Percent: [####################] 100.00% Finished.
[] Build a NTM model finished
[
] Reading checkpoints...
Traceback (most recent call last):
File "/Users/maurice/PycharmProjects/NTM/NTM-tensorflow/main.py", line 72, in
tf.app.run()
File "/Users/maurice/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/Users/maurice/PycharmProjects/NTM/NTM-tensorflow/main.py", line 62, in main
task.run(ntm, int(FLAGS.test_max_length * 1 / 3), sess)
File "/Users/maurice/PycharmProjects/NTM/NTM-tensorflow/tasks/copy.py", line 30, in run
output_states = [state['read_w'][0] for state in ntm.get_output_states(seq_length)]
File "/Users/maurice/PycharmProjects/NTM/NTM-tensorflow/ntm.py", line 214, in get_output_states
if not self.output_states.has_key(seq_length):
AttributeError: 'collections.defaultdict' object has no attribute 'has_key'

Can you help me pls ?

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants