-
Notifications
You must be signed in to change notification settings - Fork 126
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
tensor.sign? no backward? #25
Comments
since it uses tensor.data = Binarize(tensor.data.org) in the code, so PyTorch won't record the grad op in the graph, in other words, no need to worry about the backward op, it won't happen at all. |
I think the gradient will be set to 1 because of the code
|
There is a question that there is no grad_output.sign() in the current code version. Just grad_input=grad_output there. Is there any error about code update? |
No, because 1.sign() = 1 |
See https://github.com/itayhubara/BinaryNet.pytorch/blob/master/models/binarized_modules.py
I want to know what is the backward process of this function. Only use tensor.sign()? What is the backward values of it?
The text was updated successfully, but these errors were encountered: