Skip to content

How to run Atari environments? #1

Description

Hi @EndingCredits,

this is really cool that you got the NEC working 👍

Have you tried to run your code on the Atari environments, in Open AI gym?

I tried to train on Pong, but I got this error,

(tf_py2_tf_1_0) ajay@ajay-h8-1170uk:~/PythonProjects/nn_q_learning_tensorflow-master$ python main.py --env PongDeterministic-v3
Namespace(EWC=0.0, EWC_decay=0.999, batch_size=4, beta=0, chk_dir=None, chk_name='model', discount=0.9, display_step=2500, double_q=1, env='PongDeterministic-v3', epsilon=0.1, epsilon_anneal=500000, epsilon_final=0.1, layer_sizes=[20], learning_rate=0.001, memory_size=1000, play_from=None, reg=0, resume_from=None, target_step=1000, training_iters=500000, use_target=True)
2017-04-27 10:54:06.210986: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-04-27 10:54:06.211009: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-04-27 10:54:06.211018: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
[2017-04-27 10:54:06,211] Making new env: PongDeterministic-v3
WARNING:tensorflow:From main.py:314: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
[2017-04-27 10:54:06,571] From main.py:314: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
  0%|                                      | 0/500000 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "main.py", line 470, in <module>
    tf.app.run()
  File "/home/ajay/anaconda3/envs/tf_py2_tf_1_0/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "main.py", line 326, in main
    act, q_ = agent.predict(state)
  File "main.py", line 101, in predict
    q = self.session.run(self.pred_q, feed_dict={self.state: [state]})
  File "/home/ajay/anaconda3/envs/tf_py2_tf_1_0/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 778, in run
    run_metadata_ptr)
  File "/home/ajay/anaconda3/envs/tf_py2_tf_1_0/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 961, in _run
    % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (1, 210, 160, 3) for Tensor u'Placeholder:0', which has shape '(?, 210)'

I guess it might be related to TF v1.0, does this repo use an earlier version?

Thank a lot for your help,

Aj

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions