idreesshaikh / Autonomous-Driving-in-Carla-using-Deep-Reinforcement-Learning

Deep Reinforcement Learning (PPO) in Autonomous Driving (Carla) [from scratch]
MIT License
278 stars 56 forks source link

ValueError: Expected parameter loc (Tensor of shape (10516, 2)) of distribution MultivariateNormal(loc: torch.Size([10516, 2]), covariance_matrix: torch.Size([10516, 2, 2])) to satisfy the constraint IndependentConstraint(Real(), 1), but found invalid values: tensor([[nan, nan], [nan, nan], [nan, nan], ..., [nan, nan], [nan, nan], [nan, nan]], grad_fn=<ExpandBackward0>) #6

Closed zengningjia closed 1 year ago

zengningjia commented 1 year ago

image Hello, I met this bug when training a ppo agent in Town02. I can't fix it. Can u help me? Thanks a lot!

idreesshaikh commented 1 year ago

Well, what I understand from your error is that the algorithm didn't receive state input for it to process therefore it broke. I'd suggest to implement multi-threading to run simulation and algorithm consistently, or change it to a more powerful device.

elpidak commented 7 months ago

@zengningjia did you find a solution? I am facing the same issue