Solved by alex.veuthey in post #2 
              
              
                This seems to be due to this commit, which I guess was not present with the torchvision version shipped with 0.4.1? (I don’t really understand the versioning in this case) 
Since nn.AdaptiveAvgPool2d is not a learnable layer, I think you could just add it to your model before running inference, as f…