Giter VIP home page Giter VIP logo

Comments (12)

autocyz avatar autocyz commented on August 16, 2024 10

Let pytorch=0.2, torchvision=0.1.8, the problem will be solved!
I don't kown why, maybe newer pytorch use 'ExpandBackward' to name layer, but older pytorch do not use. And the layer_dict in pytorch2caffe.py do not have 'ExpandBackward'

from pytorch2caffe.

autocyz avatar autocyz commented on August 16, 2024 3

@wyfdodogod I think you needn't retrain in torch 2, you should understand the meaning of ExpandBackward and add this key to layer_dict , then you should add some operater in function pytorch2prototxt, just like elif parent_type == 'BatchNormBackward':

from pytorch2caffe.

xuzijian avatar xuzijian commented on August 16, 2024

I have met same problems. I guess the conversion code has not support 'ExpandBackward' currently.

from pytorch2caffe.

jnulzl avatar jnulzl commented on August 16, 2024

met same problems too!

from pytorch2caffe.

wangxc2006 avatar wangxc2006 commented on August 16, 2024

same problem, can anybody give some tips?

from pytorch2caffe.

lzhaozi avatar lzhaozi commented on August 16, 2024

met same problems too!

from pytorch2caffe.

wyfdodogod avatar wyfdodogod commented on August 16, 2024

does that mean any model trained in torch version 3 and above need to be retrained in torch 2 and then safe to be converted to caffe

from pytorch2caffe.

wyfdodogod avatar wyfdodogod commented on August 16, 2024

@autocyz ty for the explaination, as you mentioned using torch 0.2 and torchvision 0.1.8, i solved the problem more specifically torch0.2 post1 using post2 and 3 might raise error causing python crash at the time caffe is imported.

from pytorch2caffe.

ys198918 avatar ys198918 commented on August 16, 2024

@wangxc2006 did you retrain the model under torch 0.2?

from pytorch2caffe.

elepherai avatar elepherai commented on August 16, 2024

Any plan to support 0.4.x ?

from pytorch2caffe.

dzyjjpy avatar dzyjjpy commented on August 16, 2024

@autocyz @longcw met same issue when running demo.py.
when i try to install 0,2.0 by pip install torch==0.2.0 or pip isntall torch-0.2.0.post********.whl
(I try install it based CUDA 9.2 or CUDA 8.0)
errors displays:
is not a supported wheel on this platform
so strange. dose anyone run demo,py sucessfully on torch==0.3.1 and torchvision==0.2.0
I trained model on the env above. thanks

from pytorch2caffe.

konioyxgq avatar konioyxgq commented on August 16, 2024

@autocyz Like you said, "should understand the meaning of ExpandBackward and add this key to layer_dict , then you should add some operater in function pytorch2prototxt, just like elif parent_type == 'BatchNormBackward':"
But i don't know ‘ExpandBackward’ means. So how should it be modified?

from pytorch2caffe.

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.