rl_locomotion icon indicating copy to clipboard operation
rl_locomotion copied to clipboard

name 'Normal' is not defined

Open juanjuanjuanbing opened this issue 1 year ago • 2 comments

Hi,

Thanks for sharing! I tried to run the code following the guide:

cd raisimLib/raisimGymTorch/raisimGymTorch/env/envs/rsg_a1_task python runner.py --name random --gpu 1 --exptid 1

However,it seemed that the name "Normal' isn't defined, I guessed it's a class and try to change it from "Normal" to "nn.Normal",but it didn't work.

Here was my output:

/home/jialei/RL/01raisim/raisim_workspace/raisimLib/raisimGymTorch/raisimGymTorch/algo/ppo/module.py:249: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if x.shape[1] > 130: Traceback (most recent call last): File "runner.py", line 231, in action = ppo.observe(obs) File "/home/jialei/RL/01raisim/raisim_workspace/raisimLib/raisimGymTorch/raisimGymTorch/algo/ppo/ppo.py", line 99, in observe self.actions, self.actions_log_prob = self.actor.sample(torch.from_numpy(actor_obs).to(self.device)) File "/home/jialei/RL/01raisim/raisim_workspace/raisimLib/raisimGymTorch/raisimGymTorch/algo/ppo/module.py", line 68, in sample actions, log_prob = self.distribution.sample(logits) File "/home/jialei/RL/01raisim/raisim_workspace/raisimLib/raisimGymTorch/raisimGymTorch/algo/ppo/module.py", line 374, in sample self.distribution = Normal(logits, self.std.reshape(self.dim)) NameError: name 'Normal' is not defined

How to deal with it? It's my honor to get your help!

Thanks again!

juanjuanjuanbing avatar Sep 18 '23 14:09 juanjuanjuanbing