boyu-ai / Hands-on-RL

https://hrl.boyuai.com/
Apache License 2.0
2.19k stars 497 forks source link

ValueError: expected sequence of length 3 at dim 2 (got 0) #31

Open Yang1231 opened 1 year ago

Yang1231 commented 1 year ago

How to deal this? In SAC training.

zxe001 commented 1 year ago

+1,py3.7 could run

COCOHUHU commented 1 year ago

I have this problem as well... appreciate if someone can provide a solution

zxe001 commented 1 year ago

Resolved

zhyantao commented 1 year ago

Maybe https://github.com/boyu-ai/Hands-on-RL/issues/30 is useful for you.

wallyxjh commented 8 months ago

How Resolved this problem

wallyxjh commented 8 months ago

Traceback (most recent call last): File "/Users/james/workspace/school/python/demo/DDPG.py", line 113, in return_list = rl_utils.train_off_policy_agent(env, agent, num_episodes, replay_buffer, minimal_size, batch_size) File "/Users/james/workspace/school/python/demo/rl_utils.py", line 65, in train_off_policy_agent action = agent.take_action(state) File "/Users/james/workspace/school/python/demo/DDPG.py", line 57, in take_action state = torch.tensor([state], dtype=torch.float).to(self.device) ValueError: expected sequence of length 3 at dim 2 (got 0)