Closed yyydddkkk closed 1 month ago
Hi,
There is no such code in this repo:
priority = network.to_priority(state,action,reward,done_bool,next_state)
But your tensors are located on different devices. Simple Google search will help you solve this problem.
Hello, could you help me solve the problem I encountered?
Traceback (most recent call last): File "train_velodyne_td3.py", line 168, in
priority = network.to_priority(state,action,reward,done_bool,next_state)
File "/root/autodl-tmp/DRL-robot-navigation/TD3/TD3.py", line 57, in to_priority
target_Q = reward + self.discount (1 - done) target_Q
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!