Skip to content
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

Tensor size mismatch #519

Open
huynhtnhut97 opened this issue Oct 31, 2024 · 0 comments
Open

Tensor size mismatch #519

huynhtnhut97 opened this issue Oct 31, 2024 · 0 comments

Comments

@huynhtnhut97
Copy link

Hello, I ran the python projects/real_world_ovmm/eval_episode.py and got the following error after having Object Navigation. Any help here is appreciated!

[ObjectNav] Goal name: ['cup from chair to table']
Traceback (most recent call last):
File "/home/nhut/Gits/home-robot/projects/real_world_ovmm/eval_episode.py", line 106, in
main()
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/nhut/Gits/home-robot/projects/real_world_ovmm/eval_episode.py", line 92, in main
action, info, obs = agent.act(obs)
File "/home/nhut/Gits/home-robot/src/home_robot/home_robot/agent/ovmm_agent/ovmm_agent.py", line 576, in act
action, info, new_state = self._nav_to_obj(obs, info)
File "/home/nhut/Gits/home-robot/src/home_robot/home_robot/agent/ovmm_agent/ovmm_agent.py", line 416, in _nav_to_obj
action, info, terminate = self._heuristic_nav(obs, info)
File "/home/nhut/Gits/home-robot/src/home_robot/home_robot/agent/ovmm_agent/ovmm_agent.py", line 338, in _heuristic_nav
action, planner_info = super().act(obs)
File "/home/nhut/Gits/home-robot/src/home_robot/home_robot/agent/objectnav_agent/objectnav_agent.py", line 404, in act
planner_inputs, vis_inputs = self.prepare_planner_inputs(
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/nhut/Gits/home-robot/src/home_robot/home_robot/agent/objectnav_agent/objectnav_agent.py", line 227, in prepare_planner_inputs
) = self.module(
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/torch/nn/parallel/data_parallel.py", line 169, in forward
return self.module(*inputs[0], **kwargs[0])
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/nhut/Gits/home-robot/src/home_robot/home_robot/agent/objectnav_agent/objectnav_agent_module.py", line 161, in forward
) = self.semantic_map_module(
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/nhut/anaconda3/envs/home-robot/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/nhut/Gits/home-robot/src/home_robot/home_robot/mapping/semantic/categorical_2d_semantic_map_module.py", line 275, in forward
local_map, local_pose = self._update_local_map_and_pose(
File "/home/nhut/Gits/home-robot/src/home_robot/home_robot/mapping/semantic/categorical_2d_semantic_map_module.py", line 591, in _update_local_map_and_pose
feat[:, 1:, :] = nn.AvgPool2d(self.du_scale)(obs[:, 4:, :, :]).view(
RuntimeError: The expanded size of the tensor (19200) must match the existing size (57600) at non-singleton dimension 2. Target sizes: [1, 5, 19200]. Tensor sizes: [5, 57600]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant