You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 19, 2021. It is now read-only.
I ran the suggested pip commands to update keras-rl2 and keras. No errors with the pip commands.
I am using Python 3.7.5
Any help on how to fix would be appreciated. When I run dqn_cartpole.py, I am getting the following error:
AttributeError: Tensor.op is meaningless when eager execution is enabled.
Full traceback:
Traceback (most recent call last):
File "dqn_cartpole.py", line 46, in
dqn.fit(env, nb_steps=50000, visualize=True, verbose=2)
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/rl/core.py", line 194, in fit
metrics = self.backward(reward, terminal=done)
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/rl/agents/dqn.py", line 324, in backward
metrics = self.trainable_model.train_on_batch(ins + [targets, masks], [dummy_targets, targets])
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 917, in train_on_batch
self._make_train_function()
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 1986, in _make_train_function
**self._function_kwargs)
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/tensorflow/python/keras/backend.py", line 3544, in function
return EagerExecutionFunction(inputs, outputs, updates=updates, name=name)
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/tensorflow/python/keras/backend.py", line 3438, in init
add_sources=True, handle_captures=True, base_graph=source_graph)
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/tensorflow/python/eager/lift_to_graph.py", line 325, in lift_to_graph
add_sources=add_sources))
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/tensorflow/python/eager/lift_to_graph.py", line 114, in _map_subgraph
ops_to_visit = [_as_operation(init_tensor)]
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/tensorflow/python/eager/lift_to_graph.py", line 37, in _as_operation
return op_or_tensor.op
File "/home/valmiki/miniconda3/envs/gym_keras_rl_n2/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 987, in op
"Tensor.op is meaningless when eager execution is enabled.")
AttributeError: Tensor.op is meaningless when eager execution is enabled.
The text was updated successfully, but these errors were encountered:
from tensorflow.python.framework.ops import disable_eager_execution
disable_eager_execution()
after the imports. The library is not properly ported to tf2 and still uses most of tf1 commands. tf2 is eger on default, while tf1 was lazy on default.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I ran the suggested pip commands to update keras-rl2 and keras. No errors with the pip commands.
I am using Python 3.7.5
Any help on how to fix would be appreciated. When I run dqn_cartpole.py, I am getting the following error:
Full traceback:
The text was updated successfully, but these errors were encountered: