harvitronix / reinforcement-learning-car

Using reinforcement learning to teach a car to avoid obstacles.
MIT License
488 stars 202 forks source link

AttributeError: module 'tensorflow' has no attribute 'python' #9

Closed firatbey closed 7 years ago

firatbey commented 7 years ago

Hi, I get the following error when I execute python3 learning.py

Loading chipmunk for Linux (64bit) [/usr/local/lib/python3.5/dist-packages/pymunk/libchipmunk64.so] Using TensorFlow backend. Traceback (most recent call last): File "learning.py", line 5, in from nn import neural_net, LossHistory File "/home/kiwis/reinforcement-learning-car/nn.py", line 15, in tf.python.control_flow_ops = tf AttributeError: module 'tensorflow' has no attribute 'python'

I am relatively new to python, your help would be greatly appreciated

harvitronix commented 7 years ago

@firatbey Looks like you may have an older version of TensorFlow. What version are you on?

ahtsan commented 7 years ago

I have the same problem my tensorflow version is tensorflow-1.0.1-cp35-cp35m-manylinux1_x86_64

ahtsan commented 7 years ago

I am in ubuntu 16.04, fresh install

ahtsan commented 7 years ago

I was able to get it running for around 2 seconds, and then it pops up "AttributeError: module 'tensorflow' has not attribute 'global_variables'" What is your tensorflow version? I am using 0.10.0

ahtsan commented 7 years ago

Finally I got it running by installing the 1.0.0 tensorflow.

Another question: can I get a pre-trained nn file instead of training myself?

ahtsan commented 7 years ago

Because I am using ubuntu on a mac, and the training becomes very slow after several seconds, fps drops from 4xx to around10.

Aziiz1989 commented 7 years ago

I am on windows 10, I changed keras backend settings to theano instead of tensorflow and it works

Microos commented 7 years ago

I just removed that statement and things still work well.

harvitronix commented 7 years ago

Fixed in #18