PoolNet
PoolNet copied to clipboard
RuntimeError: Error(s) in loading state_dict for PoolNet
When I run test: python main.py --mode='test' --model='results/run-1/models/final.pth' --test_fold='results/run-1-sal-e' --sal_mode='e'
RuntimeError: Error(s) in loading state_dict for PoolNet: Unexpected key(s) in state_dict: "block.0.block_in1.0.weight", "block.0.block_in2.0.weight", "block.0.block_mid1.0.0.weight"... size mismatch for score.score.weight: copying a param with shape torch.Size([1, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([1, 128, 1, 1]).
my environment: torch=0.4.1 python=3.6.7
When I use pre-trained model of results/run-0/models/final.pth, no errors occur. Were the pre-trained models trained in the same pytorch version?
Facing the same issue while testing the pre-trained model of joint training.
torch: 1.6.0 python: 3.6.9
Duplicate of #59
Thank you, it worked out. Really appreciate your fast response!