farizrahman4u / qlearning4k

Q-learning for Keras
MIT License
385 stars 84 forks source link

TypeError: float() argument must be a string or a number #8

Closed SeekPoint closed 7 years ago

SeekPoint commented 8 years ago

envy@ub1404:~/os_pri/github/qlearning4k/examples$ python test_catch.py Using Theano backend. Using gpu device 0: GeForce GTX 950M (CNMeM is disabled, CuDNN 4007) /home/envy/.local/lib/python2.7/site-packages/theano/tensor/signal/downsample.py:5: UserWarning: downsample module has been moved to the pool module. warnings.warn("downsample module has been moved to the pool module.") Epoch 001/1000 | Loss 0.0000 | Epsilon 0.10 | Win count 1 Traceback (most recent call last): File "test_catch.py", line 20, in agent.train(catch, batch_size=10, nb_epoch=1000, epsilon=.1) File "/home/envy/.local/lib/python2.7/site-packages/qlearning4k/agent.py", line 94, in train loss += float(model.train_on_batch(inputs, targets)) TypeError: float() argument must be a string or a number envy@ub1404:~/os_pri/github/qlearning4k/examples$

tigerneil commented 8 years ago

I also have the problem.

> $ python test_snake.py                                                                                                              ⬡ 5.9.1 [±master ●]
Using TensorFlow backend.
Traceback (most recent call last):
  File "test_snake.py", line 23, in <module>
    agent.train(snake, batch_size=64, nb_epoch=10000, gamma=0.8)
  File "build/bdist.macosx-10.11-intel/egg/qlearning4k/agent.py", line 94, in train
TypeError: float() argument must be a string or a number
wannaphong commented 8 years ago

Fix in https://github.com/farizrahman4u/qlearning4k/pull/11