boyu-ai/Hands-on-RL

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

Yang1231 opened this issue · 6 comments

How to deal this? In SAC training.

zxe001 commented

+1,py3.7 could run

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

zxe001 commented

Resolved

Maybe #30 is useful for you.

How Resolved this problem

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)