-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'tuple' object has no attribute 'to' #27
Comments
Yisikanadai
changed the title
Tensors must have same number of dimensions: got 2 and 1
RuntimeError: Tensors must have same number of dimensions: got 2 and 1
Dec 21, 2024
Yisikanadai
changed the title
RuntimeError: Tensors must have same number of dimensions: got 2 and 1
AttributeError: 'tuple' object has no attribute 'to'
Dec 21, 2024
Check the state of the network input and check the network type is LSTM or MLP |
Thanks to reply!!! the network type is MLP
here is the network input
the learn code is here
I try to change
I find the code is here
the output is
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/home/ubuntu417/anaconda3/envs/go2_rl/bin/python unitree_rl_gym-main/legged_gym/scripts/train.py --task=go2
Importing module 'gym_38' (/home/ubuntu417/unitree_go2/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_38.so)
Setting GYM_USD_PLUG_INFO_PATH to /home/ubuntu417/unitree_go2/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
PyTorch version 1.13.0+cu116
Using /home/ubuntu417/.cache/torch_extensions/py38_cu116 as PyTorch extensions root...
Emitting ninja build file /home/ubuntu417/.cache/torch_extensions/py38_cu116/gymtorch/build.ninja...
Building extension module gymtorch...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
Loading extension module gymtorch...
Device count 1
/home/ubuntu417/unitree_go2/isaacgym/python/isaacgym/_bindings/src/gymtorch
ninja: no work to do.
Setting seed: 1
Not connected to PVD
+++ Using GPU PhysX
Physics Engine: PhysX
Physics Device: cuda:0
GPU Pipeline: enabled
Traceback (most recent call last):
File "unitree_rl_gym-main/legged_gym/scripts/train.py", line 18, in
train(args)
File "unitree_rl_gym-main/legged_gym/scripts/train.py", line 14, in train
ppo_runner.learn(num_learning_iterations=train_cfg.runner.max_iterations, init_at_random_ep_len=True)
File "/home/ubuntu417/unitree_go2/rsl_rl-1.0.2/rsl_rl/runners/on_policy_runner.py", line 94, in learn
obs = obs.to(self.device)
AttributeError: 'tuple' object has no attribute 'to'
I print the obs
(tensor([ 0.3188, -0.7567, 0.4211, 0.2648, -0.1023, 0.1416, 0.0095, -0.0221,
-1.0391, 1.7729, -1.4516, -0.2500, 0.0288, -0.0544, -0.2970, -0.0498,
0.1930, -0.0523, 0.0227, 0.2263, -0.0120, 0.0081, -0.2732, 0.0702,
0.0331, -0.0871, 0.8401, 0.0096, -0.1943, 0.2382, -0.0160, -0.2962,
0.2006, 0.0689, 0.3692, -0.2438, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000],
device='cuda:0'), tensor([ 0.5073, 0.1631, -0.3483, -0.1181, -0.0402, 0.0271, -0.0341, -0.0391,
-0.9990, 0.4094, -1.3506, 0.1190, 0.0476, -0.1898, -0.2205, -0.0270,
0.1521, -0.2034, -0.0153, 0.2692, 0.3511, -0.0042, -0.0101, -0.0339,
-0.0519, 0.1259, 0.5441, -0.0084, -0.2618, 0.6837, 0.0273, -0.0903,
-0.6574, 0.0496, 0.0299, 0.1390, 0.0000, 0.0000, 0.0000, 0.0000,
0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000],
device='cuda:0'))
The text was updated successfully, but these errors were encountered: