You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use python3.6 to implement the program, the error shows :
Traceback (most recent call last):
File "main.py", line 70, in
tf.app.run()
File "/home/tanggy/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "main.py", line 62, in main
agent = Agent(config, env, sess)
File "/home/tanggy/Downloads/DQN-tensorflow-master/dqn/agent.py", line 30, in init
self.build_dqn()
File "/home/tanggy/Downloads/DQN-tensorflow-master/dqn/agent.py", line 328, in build_dqn
self._saver = tf.train.Saver(self.w.values() + [self.step_op], max_to_keep=30)
TypeError: unsupported operand type(s) for +: 'dict_values' and 'list
The text was updated successfully, but these errors were encountered:
Hi everyone. I am fairly sure that this is the source of the problem. In Python 2, dict.values() returns a list, but in Python 3 it returns a "view", which I'm not sure what it is. I just tested and it's possible to cast the return of dict.values() to a list. Maybe someone can test a fix like this one:
When I use python3.6 to implement the program, the error shows :
Traceback (most recent call last):
File "main.py", line 70, in
tf.app.run()
File "/home/tanggy/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "main.py", line 62, in main
agent = Agent(config, env, sess)
File "/home/tanggy/Downloads/DQN-tensorflow-master/dqn/agent.py", line 30, in init
self.build_dqn()
File "/home/tanggy/Downloads/DQN-tensorflow-master/dqn/agent.py", line 328, in build_dqn
self._saver = tf.train.Saver(self.w.values() + [self.step_op], max_to_keep=30)
TypeError: unsupported operand type(s) for +: 'dict_values' and 'list
The text was updated successfully, but these errors were encountered: