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

two example not work #27

Open
RozenAstrayChen opened this issue Jul 20, 2018 · 2 comments
Open

two example not work #27

RozenAstrayChen opened this issue Jul 20, 2018 · 2 comments

Comments

@RozenAstrayChen
Copy link

Hi , I have two problem in test_catch.py and test_snake.py

  • python version : Anaconda3/python3.5
  • platform : macOS
  • backend : Tensorflow

In test_catch.py

Traceback (most recent call last):
  File "test_catch.py", line 20, in <module>
    agent.train(catch, batch_size=10, nb_epoch=1000, epsilon=.1)
  File "/Users/Rozen_mac/anaconda3/lib/python3.5/site-packages/qlearning4k-0.0.1-py3.5.egg/qlearning4k/agent.py",line 62, in train
  File "/Users/Rozen_mac/anaconda3/lib/python3.5/site-packages/qlearning4k-0.0.1-py3.5.egg/qlearning4k/agent.py",line 37, in check_game_compatibility
AttributeError: 'Sequential' object has no attribute 'input_layers_node_indices'

In test_snake.py

Traceback (most recent call last):
  File "test_snake.py", line 25, in <module>
    agent.train(snake, batch_size=64, nb_epoch=10000, gamma=0.8)
  File "/Users/Rozen_mac/anaconda3/lib/python3.5/site-packages/qlearning4k-0.0.1-py3.5.egg/qlearning4k/agent.py",line 62, in train
  File "/Users/Rozen_mac/anaconda3/lib/python3.5/site-packages/qlearning4k-0.0.1-py3.5.egg/qlearning4k/agent.py",line 37, in check_game_compatibility
AttributeError: 'Sequential' object has no attribute 'input_layers_node_indices'
@MarkusOstermayer
Copy link

MarkusOstermayer commented Jul 22, 2018

Hey,
I had no problems running the code on Linux with Tensorflow 1.4.0 and Keras 2.1.2, which version of Keras are you running on your machine?

If you are only running the tests and you do not plan on running any Multi-node-input networks, you can just comment line 37 and 38 in agent.py out, then the code should just run fine, I just tested it.

@Zamony
Copy link

Zamony commented Nov 18, 2018

Same problem

  • OS: Ubuntu 18.04 64bit
  • Python 3.6.6
  • Tensorflow 1.12.0
  • Keras 2.2.4

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

3 participants