Giter Site home page Giter Site logo

Comments (1)

v1093 avatar v1093 commented on May 20, 2024

Hi,

I get the following error when I try and run your example pytorch notebooks:

~/code/development_tools/anaconda3/envs/fastai/lib/python3.7/site-packages/torch/onnx/symbolic.py in adaptive_avg_pool2d(g, input, output_size)
    598 @parse_args('v', 'is')
    599 def adaptive_avg_pool2d(g, input, output_size):
--> 600     assert output_size == [1, 1], "Only output_size=[1, 1] is supported"
    601     return g.op("GlobalAveragePool", input)
    602 

AssertionError: Only output_size=[1, 1] is supported

I haven't modified anything, and I wonder if you have any idea what the source of this error is?

Regards,

Alex

For me, downgrading torchvision from 0.2.2 to 0.2.1 worked.
So basically, torchvision 0.2.2 has an AdaptiveAvgPool2d instead of AvgPool2d in AlexNet.
It was mentioned in PyTorch discussions page: https://discuss.pytorch.org/t/when-using-torch-onnx-export-errors-occurs-assertionerror-only-output-size-1-1-is-supported/38528/3

from hiddenlayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.