Torchvision.models.inception_v3 error

I tried to use inception_v3 from torchvision like this

learn =

and got an error:
RuntimeError: Calculated padded input size per channel: (3 x 3). Kernel size: (5 x 5). Kernel size can’t be greater than actual input size at /opt/conda/conda-bld/pytorch-nightly_1540805525195/work/aten/src/THNN/generic/SpatialConvolutionMM.c:50

I dont understand how to use inception3 with fastai
Could you, please, give me some directions to follow?

fastai.version == ‘1.0.28’

1 Like

i too get the same error,but interestingly while running it in Kaggle i dont get this kind of error.

Using fastai==1.0.46 I’ve tried:

m = torchvision.models.inception_v3(num_classes=data_224.c)
learn =
    arch=lambda *args : m)

But it just hangs without an error response until I restart my kernel.

Similarly, trying:

m = torchvision.models.inception_v3(num_classes=data_224.c)
learn = Learner(data_224, m)

Will return a Learner object, but when trying to print summary or fit it gives the error:

AttributeError: ‘NoneType’ object has no attribute ‘shape’