Closed pablovela5620 closed 4 years ago
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.
@pablovela5620 This issue occurs due to torch version 1.2 or higher. On downgrading to torch==1.1, this issue gets resolved for me.
Didn't get to try downgrading pytorch, but @mks0601 suggestion worked for me! Though probably not ideal, thank you both for the help!
@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.
@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 ofanaconda3/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.
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
Trying to run the demo using
Getting the following error
I thought maybe it had something to do with the models not having write permission, but I made sure to change that and still encounter this. Anyone else seen this?