~/anaconda3/envs/garage/lib/python3.6/site-packages/tensorflow/python/client/session.py in _run_fn(feed_dict, fetch_list, target_list, options, run_metadata)
1357 # Ensure any changes to the graph are reflected in the runtime.
-> 1358 self._extend_graph()
1359 return self._call_tf_sessionrun(options, feed_dict, fetch_list,
~/anaconda3/envs/garage/lib/python3.6/site-packages/tensorflow/python/client/session.py in _extend_graph(self)
1397 with self._graph._session_run_lock(): # pylint: disable=protected-access
-> 1398 tf_session.ExtendSession(self._session)
1399
InvalidArgumentError: Node 'optimize/hx_plain/gradients_hx_plain/ConjugateGradientOptimizer/update_opt_mean_kl/gradients_constraint/policy_1/gru/rnn_2/while_grad/policy_1/gru/rnn_2/while_grad_grad/ConjugateGradientOptimizer/update_opt_mean_kl/gradients_constraint/policy_1/gru/rnn_2/while_grad/policy_1/gru/rnn_2/while_grad_grad': Connecting to invalid output 78 of source node ConjugateGradientOptimizer/update_opt_mean_kl/gradients_constraint/policy_1/gru/rnn_2/while_grad/policy_1/gru/rnn_2/while_grad which has 78 outputs. Try using tf.compat.v1.experimental.output_all_intermediates(True).
During handling of the above exception, another exception occurred:
In the example "trpo_gym_tf_cartpole", an error is reported when changing to GRUPolicy, how can I solve this problem?
2021-06-17 15:35:32 | [trpo_gym_tf_cartpole] epoch #0 | computing descent direction
InvalidArgumentError Traceback (most recent call last) ~/anaconda3/envs/garage/lib/python3.6/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, args) 1374 try: -> 1375 return fn(args) 1376 except errors.OpError as e:
~/anaconda3/envs/garage/lib/python3.6/site-packages/tensorflow/python/client/session.py in _run_fn(feed_dict, fetch_list, target_list, options, run_metadata) 1357 # Ensure any changes to the graph are reflected in the runtime. -> 1358 self._extend_graph() 1359 return self._call_tf_sessionrun(options, feed_dict, fetch_list,
~/anaconda3/envs/garage/lib/python3.6/site-packages/tensorflow/python/client/session.py in _extend_graph(self) 1397 with self._graph._session_run_lock(): # pylint: disable=protected-access -> 1398 tf_session.ExtendSession(self._session) 1399
InvalidArgumentError: Node 'optimize/hx_plain/gradients_hx_plain/ConjugateGradientOptimizer/update_opt_mean_kl/gradients_constraint/policy_1/gru/rnn_2/while_grad/policy_1/gru/rnn_2/while_grad_grad/ConjugateGradientOptimizer/update_opt_mean_kl/gradients_constraint/policy_1/gru/rnn_2/while_grad/policy_1/gru/rnn_2/while_grad_grad': Connecting to invalid output 78 of source node ConjugateGradientOptimizer/update_opt_mean_kl/gradients_constraint/policy_1/gru/rnn_2/while_grad/policy_1/gru/rnn_2/while_grad which has 78 outputs. Try using tf.compat.v1.experimental.output_all_intermediates(True).
During handling of the above exception, another exception occurred:
InvalidArgumentError Traceback (most recent call last)