openai / universe-starter-agent

A starter agent that can solve a number of universe environments.
MIT License
1.1k stars 318 forks source link

BasicLSTMCell and LSTMStateTuple was moved from contrib.rnn.rnn_cell to contrib.rnn in Tensorflow-1.1 #123

Closed bjornite closed 6 years ago

bjornite commented 6 years ago

I get the error:

AttributeError: 'module' object has no attribute 'rnn_cell'

When running the example command: python train.py --num-workers 2 --env-id gym-core.PongDeterministic-v3 --log-dir /tmp/vncpong

Fix is to do this in model.py: change lstm = rnn.rnn_cell.BasicLSTMCell(size, state_is_tuple=True) to lstm = rnn.BasicLSTMCell(size, state_is_tuple=True)

And the same thing for LSTMStateTuple: change state_in = rnn.rnn_cell.LSTMStateTuple(c_in, h_in) to state_in = rnn.LSTMStateTuple(c_in, h_in)