Fix bug - layer names and activation from previous refactor
Author: amyeroberts
Pull request: yes

# What does this PR do?

Removes two issues introduced by the PR, removing `nn.Sequential` subclasses: https://github.com/huggingface/transformers/commit/bdc01711d67161ef5c2097b6d2d885645e0a0f08

1. `nn.Sequential` block removed within an `__init__` causing differences in layer naming, resulting in weights not being loaded
2. Fixes logic issue where a final linear weight was missing in the maskformer model

All the models affected by the previous PR (maskformer, resnet, regnet, van) have been loaded in with their default checkpoint weights to double check all layers have their weights initialised, and all weights from the checkpoint are used. 

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. 

Comments:
_The documentation is not available anymore as the PR was closed or merged._

Hey @amyeroberts! Could you show a snippet of where the current implementation is faulty (ideally for both resnet and maskformer)? Running a model load with either current `main` or this PR seems to result in the same layers being loaded/not loaded.

@LysandreJik - Sure. Here's how I found the issues (and checked it was working). 

The script I was running:
```
from transformers import VanForImageClassification, ResNetForImageClassification, RegNetForImageClassification, MaskFormerForInstanceSegmentation

print("\nLoading ResNet")
model = ResNetForImageClassification.from_pretrained("microsoft/resnet-50")

print("\nLoading VAN")
model = VanForImageClassification.from_pretrained("Visual-Attention-Network/van-base")

print("\nLoading RegNet")
model = RegNetForImageClassification.from_pretrained("facebook/regnet-y-040")

print("\nLoading MaskFormer")
model = MaskFormerForInstanceSegmentation.from_pretrained("facebook/maskformer-swin-base-ade")
```

Running on `main` I get the following output:
```
(tenv) aroberts:transformers $ git checkout main
Already on 'main'
Your branch is ahead of 'origin/main' by 75 commits.
  (use "git push" to publish your local commits)
(tenv) aroberts:transformers $ python ../test_model_weight_loading.py

Loading ResNet
Some weights of the model checkpoint at microsoft/resnet-50 were not used when initializing ResNetForImageClassification: ['resnet.encoder.stages.1.layers.3.layer.0.normalization.weight', 'resnet.encoder.stages.0.layers.1.layer.2.convolution.weight', 'resnet.encoder.stages.1.layers.0.layer.1.normalization.running_var', 'resnet.encoder.stages.3.layers.0.shortcut.normalization.bias', 'resnet.encoder.stages.1.layers.0.layer.1.normalization.bias', 'resnet.encoder.stages.1.layers.0.layer.0.normalization.bias', 'resnet.encoder.stages.0.layers.1.layer.0.convolution.weight', 'resnet.encoder.stages.1.layers.2.layer.2.normalization.running_var', 'resnet.encoder.stages.0.layers.1.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.layers.3.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.layers.1.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.layers.4.layer.0.convolution.weight', 'resnet.encoder.stages.2.layers.2.layer.2.normalization.running_mean', 'resnet.encoder.stages.3.layers.0.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.layers.1.layer.0.convolution.weight', 'resnet.encoder.stages.2.layers.0.shortcut.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.3.layer.0.normalization.bias', 'resnet.encoder.stages.3.layers.2.layer.0.normalization.bias', 'resnet.encoder.stages.1.layers.2.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.layers.3.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.0.layer.0.normalization.bias', 'resnet.encoder.stages.0.layers.2.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.layers.3.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.0.layer.0.normalization.bias', 'resnet.encoder.stages.3.layers.2.layer.0.normalization.weight', 'resnet.encoder.stages.0.layers.2.layer.0.normalization.running_mean', 'resnet.encoder.stages.1.layers.1.layer.2.normalization.running_var', 'resnet.encoder.stages.2.layers.3.layer.1.normalization.weight', 'resnet.encoder.stages.1.layers.2.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.1.layer.2.normalization.weight', 'resnet.encoder.stages.2.layers.1.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.2.layer.0.convolution.weight', 'resnet.encoder.stages.3.layers.2.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.0.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.2.layer.0.convolution.weight', 'resnet.encoder.stages.2.layers.0.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.layers.1.layer.1.normalization.bias', 'resnet.encoder.stages.2.layers.4.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.0.shortcut.normalization.bias', 'resnet.encoder.stages.3.layers.2.layer.1.normalization.bias', 'resnet.encoder.stages.0.layers.2.layer.0.normalization.running_var', 'resnet.encoder.stages.3.layers.2.layer.1.convolution.weight', 'resnet.encoder.stages.1.layers.1.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.layers.3.layer.0.normalization.weight', 'resnet.encoder.stages.1.layers.1.layer.2.normalization.bias', 'resnet.encoder.stages.1.layers.3.layer.0.convolution.weight', 'resnet.encoder.stages.1.layers.1.layer.2.convolution.weight', 'resnet.encoder.stages.2.layers.0.shortcut.convolution.weight', 'resnet.encoder.stages.0.layers.2.layer.0.normalization.weight', 'resnet.encoder.stages.3.layers.0.layer.2.normalization.bias', 'resnet.encoder.stages.1.layers.0.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.layers.2.layer.1.normalization.running_var', 'resnet.encoder.stages.2.layers.3.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.0.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.4.layer.1.normalization.running_var', 'resnet.encoder.stages.1.layers.1.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.layers.3.layer.0.convolution.weight', 'resnet.encoder.stages.2.layers.2.layer.0.normalization.running_var', 'resnet.encoder.stages.2.layers.0.layer.0.normalization.weight', 'resnet.encoder.stages.2.layers.2.layer.1.normalization.bias', 'resnet.encoder.stages.0.layers.1.layer.1.normalization.running_var', 'resnet.encoder.stages.2.layers.0.layer.2.convolution.weight', 'resnet.encoder.stages.2.layers.2.layer.1.convolution.weight', 'resnet.encoder.stages.0.layers.1.layer.0.normalization.weight', 'resnet.encoder.stages.3.layers.0.layer.0.normalization.running_var', 'resnet.encoder.stages.0.layers.2.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.0.shortcut.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.0.shortcut.normalization.running_mean', 'resnet.encoder.stages.0.layers.0.layer.2.normalization.running_var', 'resnet.encoder.stages.1.layers.1.layer.2.normalization.weight', 'resnet.encoder.stages.2.layers.2.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.layers.3.layer.2.normalization.running_var', 'resnet.encoder.stages.1.layers.1.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.2.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.0.layer.1.normalization.weight', 'resnet.encoder.stages.2.layers.5.layer.0.convolution.weight', 'resnet.encoder.stages.0.layers.0.layer.1.normalization.weight', 'resnet.encoder.stages.0.layers.1.layer.2.normalization.running_var', 'resnet.encoder.stages.3.layers.2.layer.2.normalization.bias', 'resnet.encoder.stages.2.layers.0.layer.1.normalization.running_var', 'resnet.encoder.stages.0.layers.2.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.0.layer.2.normalization.weight', 'resnet.encoder.stages.2.layers.3.layer.2.normalization.weight', 'resnet.encoder.stages.1.layers.2.layer.2.normalization.weight', 'resnet.encoder.stages.1.layers.2.layer.0.normalization.running_var', 'resnet.encoder.stages.1.layers.1.layer.0.normalization.weight', 'resnet.encoder.stages.2.layers.0.layer.1.normalization.bias', 'resnet.encoder.stages.2.layers.4.layer.0.normalization.bias', 'resnet.encoder.stages.1.layers.3.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.1.layer.2.normalization.weight', 'resnet.encoder.stages.3.layers.0.layer.0.normalization.weight', 'resnet.encoder.stages.3.layers.0.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.1.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.0.layer.2.convolution.weight', 'resnet.encoder.stages.2.layers.3.layer.0.normalization.bias', 'resnet.encoder.stages.1.layers.0.layer.0.normalization.weight', 'resnet.encoder.stages.2.layers.2.layer.0.normalization.bias', 'resnet.encoder.stages.2.layers.4.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.3.layer.1.normalization.bias', 'resnet.encoder.stages.3.layers.0.layer.1.normalization.bias', 'resnet.encoder.stages.2.layers.2.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.1.layer.1.normalization.weight', 'resnet.encoder.stages.1.layers.0.layer.0.normalization.running_var', 'resnet.encoder.stages.1.layers.2.layer.0.convolution.weight', 'resnet.encoder.stages.1.layers.2.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.0.layer.2.normalization.running_var', 'resnet.encoder.stages.2.layers.0.shortcut.normalization.running_mean', 'resnet.encoder.stages.1.layers.2.layer.2.normalization.bias', 'resnet.encoder.stages.2.layers.0.layer.0.normalization.running_var', 'resnet.encoder.stages.0.layers.2.layer.2.normalization.weight', 'resnet.encoder.stages.1.layers.3.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.layers.5.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.0.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.4.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.2.layer.0.normalization.bias', 'resnet.encoder.stages.2.layers.5.layer.1.normalization.running_var', 'resnet.encoder.stages.3.layers.1.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.layers.0.layer.1.normalization.weight', 'resnet.encoder.stages.2.layers.2.layer.2.normalization.weight', 'resnet.encoder.stages.2.layers.5.layer.1.normalization.weight', 'resnet.encoder.stages.2.layers.1.layer.0.normalization.weight', 'resnet.encoder.stages.0.layers.0.layer.2.normalization.bias', 'resnet.encoder.stages.0.layers.0.shortcut.normalization.bias', 'resnet.encoder.stages.0.layers.0.layer.0.normalization.running_var', 'resnet.encoder.stages.0.layers.0.shortcut.normalization.running_mean', 'resnet.encoder.stages.3.layers.1.layer.2.normalization.running_var', 'resnet.encoder.stages.1.layers.1.layer.0.convolution.weight', 'resnet.encoder.stages.0.layers.0.shortcut.normalization.running_var', 'resnet.encoder.stages.1.layers.3.layer.2.normalization.bias', 'resnet.encoder.stages.1.layers.1.layer.1.normalization.running_var', 'resnet.encoder.stages.2.layers.5.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.4.layer.2.normalization.running_mean', 'resnet.encoder.stages.3.layers.1.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.4.layer.1.normalization.weight', 'resnet.encoder.stages.0.layers.1.layer.0.normalization.running_var', 'resnet.encoder.stages.3.layers.1.layer.1.convolution.weight', 'resnet.encoder.stages.3.layers.0.layer.2.convolution.weight', 'resnet.encoder.stages.3.layers.0.shortcut.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.3.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.5.layer.0.normalization.weight', 'resnet.encoder.stages.1.layers.3.layer.1.convolution.weight', 'resnet.encoder.stages.1.layers.1.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.1.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.0.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.layers.0.layer.2.normalization.bias', 'resnet.encoder.stages.2.layers.3.layer.0.normalization.running_mean', 'resnet.encoder.stages.0.layers.1.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.layers.5.layer.2.normalization.running_mean', 'resnet.encoder.stages.3.layers.0.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.layers.5.layer.2.convolution.weight', 'resnet.encoder.stages.2.layers.3.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.layers.1.layer.1.normalization.weight', 'resnet.encoder.stages.0.layers.1.layer.1.normalization.bias', 'resnet.encoder.stages.1.layers.3.layer.0.normalization.running_mean', 'resnet.encoder.stages.1.layers.0.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.0.layer.0.normalization.weight', 'resnet.encoder.stages.2.layers.5.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.2.layer.1.convolution.weight', 'resnet.encoder.stages.0.layers.1.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.1.layer.1.normalization.running_mean', 'resnet.encoder.stages.3.layers.0.shortcut.normalization.running_var', 'resnet.encoder.stages.1.layers.0.shortcut.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.0.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.layers.0.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.1.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.layers.3.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.2.layer.0.normalization.running_var', 'resnet.encoder.stages.2.layers.3.layer.1.normalization.running_mean', 'resnet.encoder.stages.0.layers.0.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.layers.0.shortcut.normalization.weight', 'resnet.encoder.stages.2.layers.0.layer.1.normalization.weight', 'resnet.encoder.stages.2.layers.0.shortcut.normalization.weight', 'resnet.encoder.stages.1.layers.0.layer.2.normalization.bias', 'resnet.encoder.stages.1.layers.3.layer.0.normalization.running_var', 'resnet.encoder.stages.1.layers.2.layer.1.normalization.running_mean', 'resnet.encoder.stages.3.layers.2.layer.2.normalization.weight', 'resnet.encoder.stages.0.layers.2.layer.2.normalization.bias', 'resnet.encoder.stages.3.layers.0.shortcut.convolution.weight', 'resnet.encoder.stages.2.layers.0.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.4.layer.0.normalization.weight', 'resnet.encoder.stages.2.layers.1.layer.1.normalization.running_var', 'resnet.encoder.stages.2.layers.0.layer.0.convolution.weight', 'resnet.encoder.stages.2.layers.2.layer.1.normalization.running_mean', 'resnet.encoder.stages.1.layers.0.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.0.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.3.layer.2.normalization.running_var', 'resnet.encoder.stages.1.layers.0.layer.2.convolution.weight', 'resnet.encoder.stages.0.layers.0.layer.1.normalization.bias', 'resnet.encoder.stages.3.layers.2.layer.1.normalization.running_var', 'resnet.encoder.stages.0.layers.1.layer.1.convolution.weight', 'resnet.encoder.stages.1.layers.0.shortcut.normalization.bias', 'resnet.encoder.stages.1.layers.3.layer.2.convolution.weight', 'resnet.encoder.stages.3.layers.1.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.layers.1.layer.1.normalization.running_var', 'resnet.encoder.stages.1.layers.3.layer.1.normalization.weight', 'resnet.encoder.stages.3.layers.0.layer.2.normalization.running_var', 'resnet.encoder.stages.2.layers.4.layer.2.normalization.bias', 'resnet.encoder.stages.2.layers.3.layer.2.normalization.bias', 'resnet.encoder.stages.1.layers.0.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.0.shortcut.convolution.weight', 'resnet.encoder.stages.0.layers.0.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.layers.3.layer.1.normalization.bias', 'resnet.encoder.stages.2.layers.2.layer.1.normalization.weight', 'resnet.encoder.stages.2.layers.3.layer.2.convolution.weight', 'resnet.encoder.stages.2.layers.4.layer.2.normalization.weight', 'resnet.encoder.stages.3.layers.0.layer.2.normalization.running_mean', 'resnet.encoder.stages.0.layers.0.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.layers.1.layer.2.normalization.running_var', 'resnet.encoder.stages.1.layers.3.layer.1.normalization.running_var', 'resnet.encoder.stages.3.layers.1.layer.0.normalization.running_var', 'resnet.encoder.stages.2.layers.4.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.layers.5.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.layers.0.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.1.layer.1.normalization.weight', 'resnet.encoder.stages.3.layers.0.layer.0.normalization.bias', 'resnet.encoder.stages.0.layers.2.layer.0.normalization.bias', 'resnet.encoder.stages.2.layers.4.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.2.layer.0.convolution.weight', 'resnet.encoder.stages.3.layers.1.layer.1.normalization.running_mean', 'resnet.encoder.stages.1.layers.0.shortcut.convolution.weight', 'resnet.encoder.stages.2.layers.4.layer.1.normalization.running_mean', 'resnet.encoder.stages.0.layers.0.layer.1.normalization.running_var', 'resnet.encoder.stages.0.layers.0.shortcut.normalization.weight', 'resnet.encoder.stages.2.layers.3.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.0.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.0.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.2.layer.2.convolution.weight', 'resnet.encoder.stages.2.layers.0.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.layers.1.layer.2.normalization.running_mean', 'resnet.encoder.stages.0.layers.2.layer.2.normalization.running_var', 'resnet.encoder.stages.2.layers.0.layer.1.normalization.running_mean', 'resnet.encoder.stages.1.layers.2.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.1.layer.0.normalization.running_var', 'resnet.encoder.stages.2.layers.4.layer.2.convolution.weight', 'resnet.encoder.stages.3.layers.1.layer.2.normalization.weight', 'resnet.encoder.stages.3.layers.2.layer.1.normalization.weight', 'resnet.encoder.stages.0.layers.1.layer.2.normalization.bias', 'resnet.encoder.stages.2.layers.5.layer.2.normalization.bias', 'resnet.encoder.stages.2.layers.1.layer.2.normalization.bias', 'resnet.encoder.stages.1.layers.0.layer.0.convolution.weight', 'resnet.encoder.stages.1.layers.0.shortcut.normalization.weight', 'resnet.encoder.stages.1.layers.2.layer.0.normalization.running_mean', 'resnet.encoder.stages.1.layers.0.shortcut.normalization.running_var', 'resnet.encoder.stages.2.layers.0.shortcut.normalization.running_var', 'resnet.encoder.stages.1.layers.1.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.2.layer.2.normalization.running_var', 'resnet.encoder.stages.0.layers.1.layer.0.normalization.bias', 'resnet.encoder.stages.2.layers.2.layer.2.normalization.bias', 'resnet.encoder.stages.0.layers.2.layer.1.normalization.bias', 'resnet.encoder.stages.2.layers.5.layer.0.normalization.running_var', 'resnet.encoder.stages.3.layers.1.layer.0.normalization.bias', 'resnet.encoder.stages.1.layers.1.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.3.layer.1.normalization.running_var', 'resnet.encoder.stages.3.layers.2.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.5.layer.0.normalization.bias', 'resnet.encoder.stages.2.layers.4.layer.2.normalization.running_var', 'resnet.encoder.stages.3.layers.2.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.1.layer.1.normalization.running_mean', 'resnet.encoder.stages.0.layers.2.layer.1.normalization.running_var', 'resnet.encoder.stages.2.layers.1.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.1.layer.0.normalization.bias', 'resnet.encoder.stages.2.layers.3.layer.0.normalization.running_var', 'resnet.encoder.stages.0.layers.1.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.5.layer.1.normalization.bias', 'resnet.encoder.stages.0.layers.2.layer.2.convolution.weight', 'resnet.encoder.stages.0.layers.2.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.0.layer.2.normalization.weight', 'resnet.encoder.stages.3.layers.0.shortcut.normalization.running_mean', 'resnet.encoder.stages.1.layers.2.layer.1.normalization.weight', 'resnet.encoder.stages.1.layers.1.layer.0.normalization.running_var', 'resnet.encoder.stages.3.layers.0.layer.0.convolution.weight', 'resnet.encoder.stages.2.layers.5.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.0.layer.2.normalization.weight', 'resnet.encoder.stages.0.layers.2.layer.1.normalization.running_mean', 'resnet.encoder.stages.3.layers.1.layer.0.convolution.weight', 'resnet.encoder.stages.0.layers.2.layer.1.normalization.weight', 'resnet.encoder.stages.2.layers.2.layer.0.normalization.weight', 'resnet.encoder.stages.3.layers.1.layer.0.normalization.weight', 'resnet.encoder.stages.2.layers.5.layer.2.normalization.weight', 'resnet.encoder.stages.2.layers.2.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.2.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.layers.2.layer.1.normalization.bias', 'resnet.encoder.stages.2.layers.2.layer.2.convolution.weight', 'resnet.encoder.stages.2.layers.4.layer.0.normalization.running_var', 'resnet.encoder.stages.2.layers.1.layer.1.normalization.weight', 'resnet.encoder.stages.2.layers.1.layer.2.convolution.weight', 'resnet.encoder.stages.1.layers.0.layer.2.normalization.running_var', 'resnet.encoder.stages.0.layers.0.layer.1.convolution.weight', 'resnet.encoder.stages.2.layers.4.layer.1.normalization.bias', 'resnet.encoder.stages.2.layers.5.layer.2.normalization.running_var', 'resnet.encoder.stages.3.layers.1.layer.1.normalization.bias', 'resnet.encoder.stages.2.layers.1.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.layers.1.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.3.layers.1.layer.2.normalization.bias', 'resnet.encoder.stages.3.layers.1.layer.2.convolution.weight', 'resnet.encoder.stages.2.layers.5.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.layers.1.layer.1.normalization.bias', 'resnet.encoder.stages.1.layers.3.layer.2.normalization.weight', 'resnet.encoder.stages.2.layers.2.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.layers.1.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.1.layers.2.layer.1.normalization.running_var', 'resnet.encoder.stages.1.layers.2.layer.0.normalization.weight', 'resnet.encoder.stages.3.layers.2.layer.2.normalization.running_var', 'resnet.encoder.stages.1.layers.2.layer.2.convolution.weight', 'resnet.encoder.stages.3.layers.2.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.layers.0.layer.1.normalization.running_var', 'resnet.encoder.stages.1.layers.0.layer.2.normalization.weight', 'resnet.encoder.stages.0.layers.0.layer.0.convolution.weight', 'resnet.encoder.stages.3.layers.2.layer.1.normalization.running_mean', 'resnet.encoder.stages.1.layers.1.layer.0.normalization.bias', 'resnet.encoder.stages.3.layers.0.layer.1.convolution.weight', 'resnet.encoder.stages.0.layers.0.layer.0.normalization.num_batches_tracked']
- This IS expected if you are initializing ResNetForImageClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing ResNetForImageClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of ResNetForImageClassification were not initialized from the model checkpoint at microsoft/resnet-50 and are newly initialized: ['resnet.encoder.stages.3.1.layer.1.normalization.bias', 'resnet.encoder.stages.3.1.layer.0.normalization.running_var', 'resnet.encoder.stages.3.0.layer.2.normalization.running_var', 'resnet.encoder.stages.1.0.shortcut.normalization.running_mean', 'resnet.encoder.stages.1.2.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.1.3.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.1.layer.1.normalization.weight', 'resnet.encoder.stages.2.4.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.1.layer.1.normalization.running_mean', 'resnet.encoder.stages.0.2.layer.1.convolution.weight', 'resnet.encoder.stages.3.1.layer.2.normalization.bias', 'resnet.encoder.stages.2.0.layer.0.convolution.weight', 'resnet.encoder.stages.0.0.shortcut.normalization.weight', 'resnet.encoder.stages.1.0.shortcut.convolution.weight', 'resnet.encoder.stages.2.3.layer.0.normalization.weight', 'resnet.encoder.stages.1.1.layer.2.convolution.weight', 'resnet.encoder.stages.3.1.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.1.3.layer.1.normalization.running_var', 'resnet.encoder.stages.0.1.layer.1.normalization.bias', 'resnet.encoder.stages.2.3.layer.1.convolution.weight', 'resnet.encoder.stages.2.4.layer.0.normalization.bias', 'resnet.encoder.stages.1.2.layer.2.normalization.bias', 'resnet.encoder.stages.3.0.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.0.2.layer.2.normalization.bias', 'resnet.encoder.stages.0.1.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.3.2.layer.2.normalization.running_var', 'resnet.encoder.stages.2.5.layer.0.normalization.bias', 'resnet.encoder.stages.2.0.layer.0.normalization.weight', 'resnet.encoder.stages.1.0.shortcut.normalization.weight', 'resnet.encoder.stages.3.2.layer.2.normalization.bias', 'resnet.encoder.stages.3.1.layer.2.normalization.running_var', 'resnet.encoder.stages.1.1.layer.0.normalization.bias', 'resnet.encoder.stages.3.0.shortcut.normalization.num_batches_tracked', 'resnet.encoder.stages.2.5.layer.2.convolution.weight', 'resnet.encoder.stages.2.1.layer.1.normalization.running_var', 'resnet.encoder.stages.2.3.layer.2.normalization.bias', 'resnet.encoder.stages.2.0.layer.1.normalization.running_var', 'resnet.encoder.stages.2.4.layer.0.normalization.running_var', 'resnet.encoder.stages.3.0.shortcut.convolution.weight', 'resnet.encoder.stages.0.1.layer.2.normalization.weight', 'resnet.encoder.stages.3.1.layer.2.normalization.weight', 'resnet.encoder.stages.1.1.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.2.layer.1.normalization.running_mean', 'resnet.encoder.stages.3.1.layer.1.normalization.running_var', 'resnet.encoder.stages.1.0.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.3.layer.0.normalization.running_mean', 'resnet.encoder.stages.1.2.layer.0.normalization.bias', 'resnet.encoder.stages.2.5.layer.2.normalization.running_mean', 'resnet.encoder.stages.3.2.layer.2.convolution.weight', 'resnet.encoder.stages.1.3.layer.0.normalization.weight', 'resnet.encoder.stages.3.0.layer.2.normalization.weight', 'resnet.encoder.stages.3.2.layer.1.convolution.weight', 'resnet.encoder.stages.2.1.layer.2.normalization.weight', 'resnet.encoder.stages.3.0.layer.0.normalization.bias', 'resnet.encoder.stages.2.4.layer.0.normalization.weight', 'resnet.encoder.stages.2.2.layer.0.normalization.running_var', 'resnet.encoder.stages.2.5.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.1.3.layer.1.convolution.weight', 'resnet.encoder.stages.2.0.layer.2.normalization.bias', 'resnet.encoder.stages.0.0.layer.0.normalization.running_var', 'resnet.encoder.stages.3.2.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.2.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.0.shortcut.normalization.num_batches_tracked', 'resnet.encoder.stages.3.0.layer.1.normalization.running_var', 'resnet.encoder.stages.0.1.layer.1.normalization.running_var', 'resnet.encoder.stages.3.2.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.1.layer.1.normalization.weight', 'resnet.encoder.stages.0.0.layer.2.normalization.bias', 'resnet.encoder.stages.0.2.layer.2.convolution.weight', 'resnet.encoder.stages.1.0.layer.2.convolution.weight', 'resnet.encoder.stages.2.2.layer.0.normalization.weight', 'resnet.encoder.stages.3.2.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.0.shortcut.convolution.weight', 'resnet.encoder.stages.2.0.layer.2.normalization.running_mean', 'resnet.encoder.stages.0.2.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.5.layer.1.normalization.bias', 'resnet.encoder.stages.3.0.shortcut.normalization.running_mean', 'resnet.encoder.stages.1.0.layer.2.normalization.running_mean', 'resnet.encoder.stages.0.0.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.2.layer.0.normalization.bias', 'resnet.encoder.stages.2.0.layer.0.normalization.running_mean', 'resnet.encoder.stages.0.0.layer.0.normalization.bias', 'resnet.encoder.stages.3.0.layer.1.convolution.weight', 'resnet.encoder.stages.3.2.layer.1.normalization.weight', 'resnet.encoder.stages.2.1.layer.0.normalization.running_mean', 'resnet.encoder.stages.0.1.layer.0.normalization.bias', 'resnet.encoder.stages.3.1.layer.0.normalization.bias', 'resnet.encoder.stages.2.2.layer.1.normalization.bias', 'resnet.encoder.stages.1.1.layer.0.normalization.running_var', 'resnet.encoder.stages.0.1.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.1.layer.1.normalization.bias', 'resnet.encoder.stages.3.0.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.0.2.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.1.layer.1.convolution.weight', 'resnet.encoder.stages.3.1.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.3.0.layer.0.normalization.running_var', 'resnet.encoder.stages.1.2.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.4.layer.1.normalization.weight', 'resnet.encoder.stages.0.2.layer.1.normalization.weight', 'resnet.encoder.stages.1.3.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.2.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.0.0.layer.0.normalization.weight', 'resnet.encoder.stages.3.2.layer.0.normalization.bias', 'resnet.encoder.stages.1.0.shortcut.normalization.num_batches_tracked', 'resnet.encoder.stages.2.3.layer.2.convolution.weight', 'resnet.encoder.stages.3.1.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.1.2.layer.1.convolution.weight', 'resnet.encoder.stages.2.0.layer.2.normalization.running_var', 'resnet.encoder.stages.0.2.layer.2.normalization.weight', 'resnet.encoder.stages.3.0.shortcut.normalization.running_var', 'resnet.encoder.stages.1.3.layer.2.convolution.weight', 'resnet.encoder.stages.0.1.layer.1.normalization.running_mean', 'resnet.encoder.stages.0.0.layer.1.normalization.bias', 'resnet.encoder.stages.1.1.layer.1.normalization.weight', 'resnet.encoder.stages.1.0.layer.1.normalization.running_var', 'resnet.encoder.stages.2.1.layer.0.convolution.weight', 'resnet.encoder.stages.1.0.layer.1.normalization.running_mean', 'resnet.encoder.stages.3.2.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.2.layer.0.normalization.weight', 'resnet.encoder.stages.2.2.layer.1.normalization.weight', 'resnet.encoder.stages.1.0.shortcut.normalization.bias', 'resnet.encoder.stages.0.0.layer.0.convolution.weight', 'resnet.encoder.stages.3.0.layer.1.normalization.weight', 'resnet.encoder.stages.1.0.layer.2.normalization.bias', 'resnet.encoder.stages.2.0.shortcut.normalization.running_mean', 'resnet.encoder.stages.2.1.layer.2.convolution.weight', 'resnet.encoder.stages.1.0.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.2.5.layer.2.normalization.running_var', 'resnet.encoder.stages.3.1.layer.0.normalization.weight', 'resnet.encoder.stages.1.3.layer.0.normalization.running_var', 'resnet.encoder.stages.2.0.layer.1.convolution.weight', 'resnet.encoder.stages.1.1.layer.1.convolution.weight', 'resnet.encoder.stages.0.0.layer.2.normalization.weight', 'resnet.encoder.stages.0.0.layer.1.normalization.running_var', 'resnet.encoder.stages.1.1.layer.2.normalization.weight', 'resnet.encoder.stages.3.0.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.1.layer.1.normalization.running_var', 'resnet.encoder.stages.1.2.layer.1.normalization.weight', 'resnet.encoder.stages.0.1.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.2.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.1.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.0.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.0.layer.2.normalization.weight', 'resnet.encoder.stages.2.4.layer.2.normalization.bias', 'resnet.encoder.stages.2.5.layer.1.convolution.weight', 'resnet.encoder.stages.0.0.shortcut.normalization.running_var', 'resnet.encoder.stages.2.4.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.0.0.layer.1.normalization.weight', 'resnet.encoder.stages.2.4.layer.1.convolution.weight', 'resnet.encoder.stages.2.4.layer.1.normalization.running_mean', 'resnet.encoder.stages.0.2.layer.0.convolution.weight', 'resnet.encoder.stages.1.3.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.3.0.layer.0.normalization.weight', 'resnet.encoder.stages.2.2.layer.1.convolution.weight', 'resnet.encoder.stages.2.5.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.1.2.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.0.1.layer.2.normalization.running_mean', 'resnet.encoder.stages.0.0.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.2.2.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.1.3.layer.2.normalization.bias', 'resnet.encoder.stages.1.3.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.0.1.layer.1.normalization.weight', 'resnet.encoder.stages.0.2.layer.1.normalization.running_var', 'resnet.encoder.stages.1.1.layer.2.normalization.running_var', 'resnet.encoder.stages.1.0.layer.0.normalization.weight', 'resnet.encoder.stages.1.1.layer.0.normalization.weight', 'resnet.encoder.stages.1.0.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.0.layer.0.normalization.running_var', 'resnet.encoder.stages.2.5.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.2.layer.1.normalization.running_var', 'resnet.encoder.stages.2.3.layer.0.normalization.bias', 'resnet.encoder.stages.2.1.layer.2.normalization.bias', 'resnet.encoder.stages.3.1.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.2.layer.1.normalization.running_var', 'resnet.encoder.stages.2.5.layer.1.normalization.weight', 'resnet.encoder.stages.3.1.layer.2.convolution.weight', 'resnet.encoder.stages.0.2.layer.0.normalization.weight', 'resnet.encoder.stages.2.4.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.0.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.0.0.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.5.layer.2.normalization.weight', 'resnet.encoder.stages.2.5.layer.0.normalization.weight', 'resnet.encoder.stages.1.1.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.1.2.layer.0.normalization.running_var', 'resnet.encoder.stages.0.1.layer.0.convolution.weight', 'resnet.encoder.stages.1.2.layer.0.normalization.weight', 'resnet.encoder.stages.2.5.layer.1.normalization.running_mean', 'resnet.encoder.stages.1.0.layer.2.normalization.running_var', 'resnet.encoder.stages.2.4.layer.2.normalization.weight', 'resnet.encoder.stages.2.1.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.3.1.layer.2.normalization.running_mean', 'resnet.encoder.stages.1.2.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.0.0.shortcut.normalization.bias', 'resnet.encoder.stages.2.4.layer.1.normalization.running_var', 'resnet.encoder.stages.3.0.layer.2.normalization.bias', 'resnet.encoder.stages.2.1.layer.2.normalization.running_var', 'resnet.encoder.stages.1.0.layer.2.normalization.weight', 'resnet.encoder.stages.1.0.layer.0.normalization.bias', 'resnet.encoder.stages.2.3.layer.0.normalization.running_var', 'resnet.encoder.stages.2.4.layer.1.normalization.bias', 'resnet.encoder.stages.0.1.layer.1.convolution.weight', 'resnet.encoder.stages.2.5.layer.0.convolution.weight', 'resnet.encoder.stages.0.0.layer.1.normalization.running_mean', 'resnet.encoder.stages.3.1.layer.0.convolution.weight', 'resnet.encoder.stages.0.2.layer.1.normalization.bias', 'resnet.encoder.stages.2.0.layer.1.normalization.weight', 'resnet.encoder.stages.2.3.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.2.4.layer.2.normalization.running_var', 'resnet.encoder.stages.2.0.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.3.layer.1.normalization.weight', 'resnet.encoder.stages.2.2.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.1.2.layer.1.normalization.running_var', 'resnet.encoder.stages.3.0.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.0.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.2.0.layer.2.convolution.weight', 'resnet.encoder.stages.2.0.layer.1.normalization.bias', 'resnet.encoder.stages.1.3.layer.1.normalization.weight', 'resnet.encoder.stages.0.2.layer.0.normalization.running_var', 'resnet.encoder.stages.2.3.layer.2.normalization.weight', 'resnet.encoder.stages.3.2.layer.1.normalization.running_mean', 'resnet.encoder.stages.3.2.layer.0.normalization.running_var', 'resnet.encoder.stages.0.1.layer.0.normalization.running_var', 'resnet.encoder.stages.3.2.layer.2.normalization.weight', 'resnet.encoder.stages.1.2.layer.1.normalization.bias', 'resnet.encoder.stages.3.2.layer.0.convolution.weight', 'resnet.encoder.stages.1.2.layer.2.convolution.weight', 'resnet.encoder.stages.2.3.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.0.shortcut.normalization.running_var', 'resnet.encoder.stages.2.1.layer.0.normalization.bias', 'resnet.encoder.stages.3.0.layer.0.normalization.running_mean', 'resnet.encoder.stages.1.1.layer.2.normalization.running_mean', 'resnet.encoder.stages.0.0.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.0.shortcut.normalization.bias', 'resnet.encoder.stages.1.2.layer.0.normalization.running_mean', 'resnet.encoder.stages.1.1.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.3.layer.1.normalization.running_mean', 'resnet.encoder.stages.0.0.layer.2.normalization.running_var', 'resnet.encoder.stages.1.1.layer.1.normalization.running_mean', 'resnet.encoder.stages.1.0.layer.0.convolution.weight', 'resnet.encoder.stages.1.1.layer.2.normalization.bias', 'resnet.encoder.stages.2.0.shortcut.normalization.weight', 'resnet.encoder.stages.3.2.layer.1.normalization.bias', 'resnet.encoder.stages.2.3.layer.1.normalization.running_var', 'resnet.encoder.stages.2.1.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.3.0.layer.1.normalization.running_mean', 'resnet.encoder.stages.0.2.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.4.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.3.0.layer.0.convolution.weight', 'resnet.encoder.stages.1.0.layer.0.normalization.running_var', 'resnet.encoder.stages.1.0.layer.0.normalization.running_mean', 'resnet.encoder.stages.2.5.layer.0.normalization.running_var', 'resnet.encoder.stages.2.1.layer.0.normalization.running_var', 'resnet.encoder.stages.2.3.layer.2.normalization.running_var', 'resnet.encoder.stages.1.3.layer.0.normalization.bias', 'resnet.encoder.stages.2.5.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.1.layer.0.normalization.weight', 'resnet.encoder.stages.2.4.layer.0.convolution.weight', 'resnet.encoder.stages.1.0.layer.1.normalization.bias', 'resnet.encoder.stages.1.0.layer.1.convolution.weight', 'resnet.encoder.stages.0.1.layer.0.normalization.weight', 'resnet.encoder.stages.2.2.layer.2.convolution.weight', 'resnet.encoder.stages.3.2.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.1.3.layer.2.normalization.weight', 'resnet.encoder.stages.0.0.shortcut.normalization.running_mean', 'resnet.encoder.stages.1.1.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.1.2.layer.2.normalization.running_var', 'resnet.encoder.stages.2.4.layer.2.convolution.weight', 'resnet.encoder.stages.2.5.layer.2.normalization.bias', 'resnet.encoder.stages.2.3.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.2.3.layer.2.normalization.running_mean', 'resnet.encoder.stages.2.5.layer.1.normalization.running_var', 'resnet.encoder.stages.0.0.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.3.layer.0.convolution.weight', 'resnet.encoder.stages.3.0.shortcut.normalization.weight', 'resnet.encoder.stages.0.0.layer.1.convolution.weight', 'resnet.encoder.stages.0.1.layer.2.convolution.weight', 'resnet.encoder.stages.1.1.layer.0.convolution.weight', 'resnet.encoder.stages.3.0.layer.2.convolution.weight', 'resnet.encoder.stages.1.3.layer.0.convolution.weight', 'resnet.encoder.stages.1.3.layer.1.normalization.bias', 'resnet.encoder.stages.0.1.layer.2.normalization.bias', 'resnet.encoder.stages.2.2.layer.2.normalization.bias', 'resnet.encoder.stages.1.3.layer.2.normalization.running_mean', 'resnet.encoder.stages.3.1.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.1.layer.1.normalization.num_batches_tracked', 'resnet.encoder.stages.1.2.layer.2.normalization.weight', 'resnet.encoder.stages.0.0.layer.2.convolution.weight', 'resnet.encoder.stages.2.3.layer.1.normalization.bias', 'resnet.encoder.stages.2.2.layer.0.convolution.weight', 'resnet.encoder.stages.0.2.layer.0.normalization.bias', 'resnet.encoder.stages.1.1.layer.1.normalization.bias', 'resnet.encoder.stages.2.2.layer.2.normalization.running_var', 'resnet.encoder.stages.2.0.shortcut.convolution.weight', 'resnet.encoder.stages.0.1.layer.2.normalization.running_var', 'resnet.encoder.stages.3.0.layer.1.normalization.bias', 'resnet.encoder.stages.0.2.layer.2.normalization.running_var', 'resnet.encoder.stages.0.2.layer.2.normalization.num_batches_tracked', 'resnet.encoder.stages.2.0.shortcut.normalization.bias', 'resnet.encoder.stages.1.2.layer.1.normalization.running_mean', 'resnet.encoder.stages.2.2.layer.2.normalization.weight', 'resnet.encoder.stages.1.0.shortcut.normalization.running_var', 'resnet.encoder.stages.2.0.layer.0.normalization.bias', 'resnet.encoder.stages.0.0.shortcut.normalization.num_batches_tracked', 'resnet.encoder.stages.0.1.layer.0.normalization.running_mean', 'resnet.encoder.stages.1.0.layer.1.normalization.weight', 'resnet.encoder.stages.0.2.layer.0.normalization.running_mean', 'resnet.encoder.stages.1.3.layer.2.normalization.running_var', 'resnet.encoder.stages.1.2.layer.0.convolution.weight', 'resnet.encoder.stages.2.4.layer.0.normalization.running_mean', 'resnet.encoder.stages.3.1.layer.1.convolution.weight', 'resnet.encoder.stages.0.2.layer.0.normalization.num_batches_tracked', 'resnet.encoder.stages.1.3.layer.0.normalization.num_batches_tracked']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.

Loading VAN

Loading RegNet

Loading MaskFormer
/Users/aroberts/.virtualenvs/tenv/lib/python3.9/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  /Users/distiller/project/pytorch/aten/src/ATen/native/TensorShape.cpp:2228.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
Some weights of the model checkpoint at facebook/maskformer-swin-base-ade were not used when initializing MaskFormerForInstanceSegmentation: ['mask_embedder.2.0.weight', 'mask_embedder.2.0.bias']
- This IS expected if you are initializing MaskFormerForInstanceSegmentation from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing MaskFormerForInstanceSegmentation from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
```

Running on this branch - `fix-weight-naming`

```
(tenv) aroberts:transformers $ git checkout fix-weight-naming
Switched to branch 'fix-weight-naming'
(tenv) aroberts:transformers $ python ../test_model_weight_loading.py

Loading ResNet

Loading VAN

Loading RegNet

Loading MaskFormer
/Users/aroberts/.virtualenvs/tenv/lib/python3.9/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  /Users/distiller/project/pytorch/aten/src/ATen/native/TensorShape.cpp:2228.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
(tenv) aroberts:transformers $ 
```

Let me know if there's anything else you'd like me to run or check.