Dronie / D2D_A2C

Channel Selection and Power Control for D2D Communication via Online Reinforcement Learning
37 stars 15 forks source link

tf2.11 execute coma_centralized error ! #6

Open zhangruixu opened 1 year ago

zhangruixu commented 1 year ago

I have modified the code based on version 2.11 of TensorFlow, but this error will be reported. Could you please help me solve it? Thank you very much!

Traceback (most recent call last): File "D:\Anaconda\envs\py310\lib\site-packages\tensorflow\python\client\session.py", line 1378, in _do_call return fn(*args) File "D:\Anaconda\envs\py310\lib\site-packages\tensorflow\python\client\session.py", line 1361, in _run_fn return self._call_tf_sessionrun(options, feed_dict, fetch_list, File "D:\Anaconda\envs\py310\lib\site-packages\tensorflow\python\client\session.py", line 1454, in _call_tf_sessionrun return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict, tensorflow.python.framework.errors_impl.InvalidArgumentError: Trying to access element 1 in a list with 1 elements. [[{{function_node GeneralizedQLambda_target_multistep_forward_view_op_scan_discounted_sum_scan_while_body_160}}{{node TensorArrayV2Read_1/TensorListGetItem}}]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "F:\D2D_A2C-master\v2\comacentralized.py", line 341, in , total_loss_critic = sess.run([central_critic.critic_optim, File "D:\Anaconda\envs\py310\lib\site-packages\tensorflow\python\client\session.py", line 968, in run result = self._run(None, fetches, feed_dict, options_ptr, File "D:\Anaconda\envs\py310\lib\site-packages\tensorflow\python\client\session.py", line 1191, in _run results = self._do_run(handle, final_targets, final_fetches, File "D:\Anaconda\envs\py310\lib\site-packages\tensorflow\python\client\session.py", line 1371, in _do_run return self._do_call(_run_fn, feeds, fetches, targets, options, File "D:\Anaconda\envs\py310\lib\site-packages\tensorflow\python\client\session.py", line 1397, in _do_call raise type(e)(node_def, op, message) # pylint: disable=no-value-for-parameter tensorflow.python.framework.errors_impl.InvalidArgumentError: Graph execution error:

Trying to access element 1 in a list with 1 elements. [[{{node TensorArrayV2Read_1/TensorListGetItem}}]]

zhangruixu commented 1 year ago

@Dronie Please take a look, thanks!