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
Fail to adapt to Pytorch Version 0.3 #29
Comments
Could someone also explain what is the benefits of using the static method in new Pytorch version and what is ctx? |
Hey! Im also interested in running this on python 3+ and pytorch 0.3 At the moment I dont have enough free time to fiddle with it myself so im going to keep an eye on this issue. I dont know what the benefit of using the static method is as that is the only one I have used. As for ctx, that is the context. The context you recieve in the forward pass of a function is the same context object that you recieve for the backward pass. You can for example save tensors in the forward pass that you are going to need in your backward pass in the ctx variable. |
Hi @lfz , So the problem is solved by changing to channelnorm.ChannelNorm_cuda_backward(input1, output, grad_output.data,
grad_input1.data, ctx.norm_deg) |
does it influence the final output, I mean, the input is now a tensor, so is its output changed to a tensor too? |
The final output of backward function such as |
pytorch/pytorch#5128 (comment)
the pytorch master has modified the safe_call
2018-02-08 23:31 GMT+08:00 Kai Chen <notifications@github.com>:
… The final output of backward function such as grad_input1 should be a
Variable. You can refer to #35
<#35> for details.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIigQ5qPzGQ5zVxoIaDULNAkvUvWrySXks5tSxM1gaJpZM4RciSa>
.
--
廖方舟
清华大学医学院
Liao Fangzhou
School of Medicine
Tsinghua University
Beijing 100084
China
|
OK PyTorch is fixing lots of api inconsistencies, thanks for the notice. |
we've added a python3 branch https://github.com/NVIDIA/flownet2-pytorch/tree/python36 |
I am trying to adapt the code to new Pytorch version and higher python version. I modify the code based on Pytorch source code, especially I modify the customized layers as follows:
functions:
`
`
modules
`
With other grammatical modifications, I am able to run the code in inference mode. But I fail to train because backpropagation is not working correctly. I met this error:
Could someone have a look? And help me locate and fix the bug?
Great thanks!
The text was updated successfully, but these errors were encountered: