Code Monkey home page Code Monkey logo

Comments (6)

mks0601 avatar mks0601 commented on July 17, 2024 17

Ah.. this is because of torchgeometry do not update their kernel code according to the updated pytorch kernel code. I'll add some hacks that I tried in README. Basically, you need to change L301~L304 of anaconda3/lib/python3.8/site-packages/torchgeometry/core/conversion.py to below.

mask_c0 = mask_d2.float() * mask_d0_d1.float()
mask_c1 = mask_d2.float() * (1 - mask_d0_d1.float())
mask_c2 = (1 - mask_d2.float()) * mask_d0_nd1.float()
mask_c3 = (1 - mask_d2.float()) * (1 - mask_d0_nd1.float())

It just changes binary masks to floating masks.

from i2l-meshnet_release.

Anirudh257 avatar Anirudh257 commented on July 17, 2024 6

@pablovela5620 This issue occurs due to torch version 1.2 or higher. On downgrading to torch==1.1, this issue gets resolved for me.

from i2l-meshnet_release.

pablovela5620 avatar pablovela5620 commented on July 17, 2024

Didn't get to try downgrading pytorch, but @mks0601 suggestion worked for me! Though probably not ideal, thank you both for the help!

from i2l-meshnet_release.

booker-max avatar booker-max commented on July 17, 2024

@pablovela5620 This issue occurs due to torch version 1.2 or higher. On downgrading to torch==1.1, this issue gets resolved for me.

Hello, I make torch==1.1, but there is a problem with "from contextlib import nullcontext" in the model.py file, "ImportError: cannot import name'nullcontext'", do you know how to solve it,thank you.

from i2l-meshnet_release.

Anirudh257 avatar Anirudh257 commented on July 17, 2024

@booker-max I am not sure about this error. But trying the below code by mka should work.

Ah.. this is because of torchgeometry do not update their kernel code according to the updated pytorch kernel code. I'll add some hacks that I tried in README. Basically, you need to change L301~L304 of anaconda3/lib/python3.8/site-packages/torchgeometry/core/conversion.py to below.

mask_c0 = mask_d2.float() * mask_d0_d1.float()
mask_c1 = mask_d2.float() * (1 - mask_d0_d1.float())
mask_c2 = (1 - mask_d2.float()) * mask_d0_nd1.float()
mask_c3 = (1 - mask_d2.float()) * (1 - mask_d0_nd1.float())

It just changes binary masks to floating masks.

from i2l-meshnet_release.

mks0601 avatar mks0601 commented on July 17, 2024

https://stackoverflow.com/questions/45187286/how-do-i-write-a-null-no-op-contextmanager-in-python

The nullcontext can be used in Python 3.7

from i2l-meshnet_release.

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.