Git Product home page Git Product logo

Comments (8)

nipponjo avatar nipponjo commented on September 23, 2024

Hello, onnx doesn't support the .view(..., -1, ...) shape inference that is used in ContextualAttention.
You can easily replace the -1's as shown here:

L = raw_w.size(2)
raw_w = raw_w.view(raw_int_bs[0], raw_int_bs[1], kernel, kernel, L)
...
w = w.view(int_bs[0], int_bs[1], self.ksize, self.ksize, L)
...
m = m.view(int_ms[0], int_ms[1], self.ksize, self.ksize, L)

from deepfillv2-pytorch.

nipponjo avatar nipponjo commented on September 23, 2024

Hi, your script works for me after the modifications. I get the same error without them. I have attached my networks.py file.
networks.py.txt

from deepfillv2-pytorch.

AnhPC03 avatar AnhPC03 commented on September 23, 2024

Hello @nipponjo, I've used your networks.py file but still got the same error. Could you share me your environment you used to convert?

from deepfillv2-pytorch.

nipponjo avatar nipponjo commented on September 23, 2024

Hello, I use the following versions:

fastapi==0.91.0
numpy==1.23.5
Pillow==9.4.0
PyYAML==6.0
torch==1.13.1+cu117
torchvision==0.14.1+cu117
uvicorn==0.20.0

from deepfillv2-pytorch.

AnhPC03 avatar AnhPC03 commented on September 23, 2024

@nipponjo Did you install by using pip or conda? And which version of python you used?

from deepfillv2-pytorch.

nipponjo avatar nipponjo commented on September 23, 2024

I installed with pip and use python 3.9.12

from deepfillv2-pytorch.

AnhPC03 avatar AnhPC03 commented on September 23, 2024

@nipponjo Thank you, I could export to ONNX successfully.
I'm very appreciate your help.

from deepfillv2-pytorch.

AnhPC03 avatar AnhPC03 commented on September 23, 2024

Hi @nipponjo, Could you help me to convert your model to MNN please?

from deepfillv2-pytorch.

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.