-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Subtraction, the -
operator, with a bool tensor is not supported. If you are trying to invert a mask, use the ~
or logical_not()
operator instead.
#6
Comments
Ah.. this is because of
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! |
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.
|
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?
The text was updated successfully, but these errors were encountered: