alexfrom0815 / Online-3D-BPP-DRL

This repository contains the implementation of paper Online 3D Bin Packing with Constrained Deep Reinforcement Learning.
292 stars 66 forks source link

RuntimeError: Error(s) in loading state_dict for Policy: size mismatch for base.critic_linear.bias #8

Closed cakaex closed 2 years ago

cakaex commented 2 years ago

When I tried to test the trained model (using a linear schedule on the learning rate in config.py),there is an error: RuntimeError: Error(s) in loading state_dict for Policy: size mismatch for base.critic_linear.bias: copying a param with shape torch.Size([]) from checkpoint, the shape in current model is torch.Size([1]).

alexfrom0815 commented 2 years ago

This may be caused by different python versions or different torch versions. The loading function is available in python 3.7 & torch 1.1~1.5

cakaex commented 2 years ago

Thanks a lot!

MLrookiexxy commented 8 months ago

When I tried to test the trained model (using a linear schedule on the learning rate in config.py),there is an error: RuntimeError: Error(s) in loading state_dict for Policy: size mismatch for base.critic_linear.bias: copying a param with shape torch.Size([]) from checkpoint, the shape in current model is torch.Size([1]).

I also encountered the same problem. I downloaded Torch versions 1.1-1.5, but still reported this error. How did you solve it?