federicovergallo / sumo-changing-lane-agent Goto Github PK
View Code? Open in Web Editor NEWImplementation of a reinforcement learning agent able to do autonomous changing lane using Sumo
Implementation of a reinforcement learning agent able to do autonomous changing lane using Sumo
Sorry, I can't understand the functions of the two lambda and add layers in CarModel
I have this problem:
please help me, thank u!
Traceback (most recent call last):
File "test.py", line 10, in
agent.train(env)
File "D:\02Office_software\Sumo\Github\SUMO-changing-lane-agent-master\a2c.py", line 106, in train
next_obs = env.reset(gui=True, numVehicles=25)
File "D:\02Office_software\Sumo\Github\SUMO-changing-lane-agent-master\gym_sumo\envs\sumo_env.py", line 327, in reset
self.start(gui, numVehicles, vType)
File "D:\02Office_software\Sumo\Github\SUMO-changing-lane-agent-master\gym_sumo\envs\sumo_env.py", line 64, in start
sumoBinary = home + "/gitprograms/sumo/bin/sumo-gui"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
When I run to around 1500 rounds, I get an error like this
**`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`**
How to solve this error?
Hello, how are the figures in the report drawn?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.