Skip to content

Dimension problem #8

@michaelzhang917

Description

@michaelzhang917

I have downloaded the following checkpoint for Bn inception model but can't use it.
Do you know how to resolve this extra dimension issue?
Thanks!

https://yjxiong.blob.core.windows.net/models/bn_inception-9f5701afb96c8044.pth
Traceback (most recent call last):
File "main.py", line 322, in
main()
File "main.py", line 38, in main
partial_bn=not args.no_partialbn)
File "/home/vbalab/projects/SimpleMovementDetection/TRN-pytorch/models.py", line 43, in init
self._prepare_base_model(base_model)
File "/home/vbalab/projects/SimpleMovementDetection/TRN-pytorch/models.py", line 108, in _prepare_base_model
self.base_model = getattr(model_zoo, base_model)()
File "/home/vbalab/projects/SimpleMovementDetection/TRN-pytorch/model_zoo/bninception/pytorch_load.py", line 35, in init
self.load_state_dict(torch.utils.model_zoo.load_url(weight_url), strict=False)
File "/home/vbalab/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 721, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for BNInception:
While copying the parameter named "conv1_7x7_s2_bn.weight", whose dimensions in the model are torch.Size([64]) and whose dimensions in the checkpoint are torch.Size([1, 64]).
While copying the parameter named "conv1_7x7_s2_bn.bias", whose dimensions in the model are torch.Size([64]) and whose dimensions in the checkpoint are torch.Size([1, 64]).
While copying the parameter named "conv1_7x7_s2_bn.running_mean", whose dimensions in the model are torch.Size([64]) and whose dimensions in the checkpoint are torch.Size([1, 64]).
While copying the parameter named "conv1_7x7_s2_bn.running_var", whose dimensions in the model are torch.Size([64]) and whose dimensions in the checkpoint are torch.Size([1, 64]).
While copying the parameter named "conv2_3x3_reduce_bn.weight", whose dimensions in the model are torch.Size([64]) and whose dimensions in the checkpoint are torch.Size([1, 64]).
While copying the parameter named "conv2_3x3_reduce_bn.bias", whose dimensions in the model are torch.Size([64]) and whose dimensions in the checkpoint are torch.Size([1, 64]).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions