qlearning4k
qlearning4k copied to clipboard
two example not work
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'
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.
Same problem
- OS: Ubuntu 18.04 64bit
- Python 3.6.6
- Tensorflow 1.12.0
- Keras 2.2.4