mengchengTang / DRL-Energy-optimal-Routing-for-Electric-Vehicles

Energy-optimal Routing for Electric Vehicles using Deep Reinforcement Learning with Transformer
14 stars 1 forks source link

Traceback (most recent call last): File "D:\gitproject\vrp\DRL-Energy-optimal-Routing-for-Electric-Vehicles-main\DM-EVRP\run.py", line 102, in <module> main() File "D:\gitproject\vrp\DRL-Energy-optimal-Routing-for-Electric-Vehicles-main\DM-EVRP\run.py", line 97, in main train_EVRP(args) File "D:\gitproject\vrp\DRL-Energy-optimal-Routing-for-Electric-Vehicles-main\DM-EVRP\trainer.py", line 230, in train_EVRP train_data = VehicleRoutingDataset(args.train_size, File "D:\gitproject\vrp\DRL-Energy-optimal-Routing-for-Electric-Vehicles-main\DM-EVRP\problems\EVRP.py", line 89, in __init__ self.distances[:, i] = torch.sqrt(torch.sum(torch.pow(self.static[:,:,i:i+1]-self.static[:,:,:],2),dim=1)) RuntimeError: The expanded size of the tensor (26) must match the existing size (27) at non-singleton dimension 1. Target sizes: [1280000, 26]. Tensor sizes: [1280000, 27] excuse me,Why did I make a mistake in this place #2

Open 17LINinmeizhou opened 8 months ago

17LINinmeizhou commented 8 months ago

Traceback (most recent call last): File "D:\gitproject\vrp\DRL-Energy-optimal-Routing-for-Electric-Vehicles-main\DM-EVRP\run.py", line 102, in main() File "D:\gitproject\vrp\DRL-Energy-optimal-Routing-for-Electric-Vehicles-main\DM-EVRP\run.py", line 97, in main train_EVRP(args) File "D:\gitproject\vrp\DRL-Energy-optimal-Routing-for-Electric-Vehicles-main\DM-EVRP\trainer.py", line 230, in train_EVRP train_data = VehicleRoutingDataset(args.train_size, File "D:\gitproject\vrp\DRL-Energy-optimal-Routing-for-Electric-Vehicles-main\DM-EVRP\problems\EVRP.py", line 89, in init self.distances[:, i] = torch.sqrt(torch.sum(torch.pow(self.static[:,:,i:i+1]-self.static[:,:,:],2),dim=1)) RuntimeError: The expanded size of the tensor (26) must match the existing size (27) at non-singleton dimension 1. Target sizes: [1280000, 26]. Tensor sizes: [1280000, 27] excuse me,Why did I make a mistake in this place