NVlabs / pacnet

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

A question about updating the weight of the kernel #29

Closed OmigaXm closed 2 years ago

OmigaXm commented 2 years ago

Thanks for sharing the code! But I still have a question.

In a pac layer, a kernel will be calculated according to the guide input. And the kernel will be calculated with the target input to get the output tensor. So when the network does the backpropagation, will the relationship between the weight of the kernel and the guide input change? Or the weight of the kernel is updated only because of the gradient?

I would be very grateful if you can give me some help. Thanks!

suhangpro commented 2 years ago

The backward pass of the layer will provide gradients on all three: a) weights (just like with regular conv2d), b) input features, and c) guide features. What we call kernel can be considered as an intermediate variable that depends only on guide features.

OmigaXm commented 2 years ago

oh, I see. Thanks!