federicovergallo / SUMO-changing-lane-agent

Implementation of a reinforcement learning agent able to do autonomous changing lane using Sumo
69 stars 16 forks source link

When I run to around 1500 rounds, I get an error like this #17

Open FADEAWAY114 opened 1 year ago

FADEAWAY114 commented 1 year ago

When I run to around 1500 rounds, I get an error like this 55

`2023-03-24 22:01:09.380560: W tensorflow/core/framework/op_kernel.cc:1763] OP_REQUIRES failed at sparse_xent_op.cc:90 : Invalid argument: Received a label value of 3 which is outside the valid range of [0, 3). Label values: 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 Traceback (most recent call last): File "/home/vmware/桌面/SUMO-changing-lane-agent-master/test.py", line 10, in agent.train(env) File "/home/vmware/桌面/SUMO-changing-lane-agent-master/a2c.py", line 136, in train losses = self.model.train_on_batch(observations, [acts_and_advs, returns]) File "/home/vmware/anaconda3/envs/changelane2/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 1727, in train_on_batch logs = self.train_function(iterator) File "/home/vmware/anaconda3/envs/changelane2/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 828, in call result = self._call(*args, *kwds) File "/home/vmware/anaconda3/envs/changelane2/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 862, in _call results = self._stateful_fn(args, kwds) File "/home/vmware/anaconda3/envs/changelane2/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2943, in call filtered_flat_args, captured_inputs=graph_function.captured_inputs) # pylint: disable=protected-access File "/home/vmware/anaconda3/envs/changelane2/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1919, in _call_flat ctx, args, cancellation_manager=cancellation_manager)) File "/home/vmware/anaconda3/envs/changelane2/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 560, in call ctx=ctx) File "/home/vmware/anaconda3/envs/changelane2/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute inputs, attrs, num_outputs) tensorflow.python.framework.errors_impl.InvalidArgumentError: Received a label value of 3 which is outside the valid range of [0, 3). Label values: 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 [[node logits_loss/sparse_categorical_crossentropy/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits (defined at /桌面/SUMO-changing-lane-agent-master/a2c.py:199) ]] [Op:__inference_train_function_9631]

Function call stack: train_function`**

SHITIANYU-hue commented 1 year ago

i also have this error

yaoleyaotououo commented 1 year ago

[FADEAWAY114],你好我最近也在跑这个代码,我跑的时候好像没出现这个问题,可以加个好友沟通吗

Of course

可以加个QQ吗,最近也在跑这个代码,但跑不起来

xbv001 commented 8 months ago

[FADEAWAY114],你好我最近也在跑这个代码,我跑的时候好像没出现这个问题,可以加个好友沟通吗

Of course

可以加个QQ吗,最近也在跑这个代码,但跑不起来

Hi, have you made it? I also encountered the same problem.

SHITIANYU-hue commented 8 months ago

可以加个微信群😂

xbv001 commented 8 months ago

可以加个微信群😂 快!大佬拉一个

SHITIANYU-hue commented 8 months ago

哪个大佬发个微信群截图?

youying12123 commented 7 months ago

I have the same error.

xulw8 commented 4 months ago

[FADEAWAY114],你好我最近也在跑这个代码,我跑的时候好像没出现这个问题,可以加个好友沟通吗

Of course

可以加个QQ吗,最近也在跑这个代码,但跑不起来

你好我也遇到这个问题,想请教一下大佬