Skip to content

跑了一千多次报错 #69

@zhian17

Description

@zhian17

Traceback (most recent call last):
File "legged_gym/scripts/train.py", line 23, in
train(args)
File "legged_gym/scripts/train.py", line 18, in train
ppo_runner.learn(num_learning_iterations=train_cfg.runner.max_iterations, init_at_random_ep_len=True)
File "/home/xjzz/rsl_rl/rsl_rl/runners/on_policy_runner.py", line 132, in learn
mean_value_loss, mean_surrogate_loss = self.alg.update()
File "/home/xjzz/rsl_rl/rsl_rl/algorithms/ppo.py", line 131, in update
self.actor_critic.act(obs_batch, masks=masks_batch, hidden_states=hid_states_batch[0])
File "/home/xjzz/rsl_rl/rsl_rl/modules/actor_critic_recurrent.py", line 77, in act
input_a = self.memory_a(observations, masks, hidden_states)
File "/home/xjzz/anaconda3/envs/rl/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/xjzz/anaconda3/envs/rl/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
File "/home/xjzz/rsl_rl/rsl_rl/modules/actor_critic_recurrent.py", line 107, in forward
out = unpad_trajectories(out, masks)
File "/home/xjzz/rsl_rl/rsl_rl/utils/utils.py", line 71, in unpad_trajectories
return trajectories.transpose(1, 0)[masks.transpose(1, 0)].view(-1, trajectories.shape[0], trajectories.shape[-1]).transpose(1, 0)
IndexError: The shape of the mask [2009, 24] at index 1 does not match the shape of the indexed tensor [2009, 20, 64] at index 1

没找到解决方法,有大佬会吗

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions