Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Fixes bug with double (overwriting) RESNETS params #488

Merged
merged 1 commit into from
Feb 22, 2019

Conversation

ClimbsRocks
Copy link
Contributor

There were two RESNETS sections, which overrode each other, leading to error messages like:

RuntimeError: Error(s) in loading state_dict for GeneralizedRCNN:
	size mismatch for backbone.fpn.fpn_inner1.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([1024, 256, 1, 1]).
...
	size mismatch for roi_heads.mask.feature_extractor.mask_fcn1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 1024, 3, 3]).

This just combines them back into a single section, while maintaining all param values. That got the model running again for me.

There were two `RESNETS` sections, which overrode each other, leading to error messages like: 

```
RuntimeError: Error(s) in loading state_dict for GeneralizedRCNN:
	size mismatch for backbone.fpn.fpn_inner1.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([1024, 256, 1, 1]).
...
	size mismatch for roi_heads.mask.feature_extractor.mask_fcn1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 1024, 3, 3]).
```

This just combines them back into a single section, while maintaining all param values. That got the model running again for me.
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 22, 2019
Copy link
Contributor

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this up!

@fmassa fmassa merged commit f40f299 into facebookresearch:master Feb 22, 2019
Lyears pushed a commit to Lyears/maskrcnn-benchmark that referenced this pull request Jun 28, 2020
)

There were two `RESNETS` sections, which overrode each other, leading to error messages like: 

```
RuntimeError: Error(s) in loading state_dict for GeneralizedRCNN:
	size mismatch for backbone.fpn.fpn_inner1.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([1024, 256, 1, 1]).
...
	size mismatch for roi_heads.mask.feature_extractor.mask_fcn1.weight: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 1024, 3, 3]).
```

This just combines them back into a single section, while maintaining all param values. That got the model running again for me.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants