when i change the --model-dir and --test_model arguments, it shows this bug:
Traceback (most recent call last):
File "/home/sora/colcon_ws/install/crowdnav_base/lib/crowdnav_base/test", line 33, in
sys.exit(load_entry_point('crowdnav-base', 'console_scripts', 'test')())
File "/home/sora/colcon_ws/build/crowdnav_base/crowdnav_base/test.py", line 173, in main
actor_critic.load_state_dict(torch.load(load_path, map_location=device))
File "/home/sora/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Policy:
size mismatch for base.spatial_attn.embedding_layer.0.weight: copying a param with shape torch.Size([128, 12]) from checkpoint, the shape in current model is torch.Size([128, 2]).
What should i do to resolve it?
when i change the --model-dir and --test_model arguments, it shows this bug:
Traceback (most recent call last):
File "/home/sora/colcon_ws/install/crowdnav_base/lib/crowdnav_base/test", line 33, in
sys.exit(load_entry_point('crowdnav-base', 'console_scripts', 'test')())
File "/home/sora/colcon_ws/build/crowdnav_base/crowdnav_base/test.py", line 173, in main
actor_critic.load_state_dict(torch.load(load_path, map_location=device))
File "/home/sora/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Policy:
size mismatch for base.spatial_attn.embedding_layer.0.weight: copying a param with shape torch.Size([128, 12]) from checkpoint, the shape in current model is torch.Size([128, 2]).
What should i do to resolve it?