NVlabs / pacnet

Pixel-Adaptive Convolutional Neural Networks (CVPR '19)
https://suhangpro.github.io/pac/
Other
514 stars 79 forks source link

Error with pacconv: trying to differentiate twice a function that was marked with @once_differentiable #28

Open maxbeauchamp opened 2 years ago

maxbeauchamp commented 2 years ago

Hi,

I tried to use pacnet in one my code but when using the function : pacconv = PacConv2d(in_ch, out_ch, f)
out_pac = pacconv(input, None, guide_k) In my case input has shape(2,1,200,200) and guide_k (2,1,3,3,200,200).

The forward pass of my code is ok but when computing the backward pass I got this error message: trying to differentiate twice a function that was marked with @once_differentiable

Do you have any idea of this issue ? Replacing the pacconv by a simple convolution layer removes the error.

Thanks in advance