Pretrained learning with different input size
Error Message in pretraining case: <SCODE>Traceback (most recent call last):
  File "main.py", line 314, in <module>
    main()
  File "main.py", line 68, in main
    model = models.__dict__[args.arch](pretrained=True)
  File "/home/dylee/.conda/envs/pytorch/lib/python2.7/site-packages/torchvision/models/alexnet.py", line 57, in alexnet
    model.load_state_dict(model_zoo.load_url(model_urls['alexnet']))
  File "/home/dylee/.conda/envs/pytorch/lib/python2.7/site-packages/torch/nn/modules/module.py", line 315, in load_state_dict
    own_state[name].copy_(param)
RuntimeError: inconsistent tensor size at /data/users/soumith/miniconda2/conda-bld/pytorch-cuda80-0.1.10_1488756735684/work/torch/lib/TH/generic/THTensorCopy.c:51
<ECODE>
neuralix
No, it’s supported. You must have some bug in your code.
apaszke
<SCODE>    own_state[name].copy_(param)
<ECODE> TO <SCODE>if name != 'classifier.1.weight' and name != 'classifier.1.bias':
    own_state[name].copy_(param)
<ECODE> By skipping parameter copying. I hope it’s helpful for someone.
neuralix