Hi,
I am implementing a modified version of Conv2D and therefore want to understand what exactly torch.nn.functional.conv2d is doing.
I think it internally uses torch.nn.grad.conv2d_weight and torch.nn.grad.conv2d_input. However, I am having a hard time understanding what exactly these functions do. I am also wondering how the gradient of the bias is computed. torch/nn/functional.py only contains a docstring for this function, but no actual code. Where can I find it?
The problem is that I can’t really find the internal implementation of torch.nn.functional.conv2d, so I can’t see how the other functions I mentioned are used and how the bias grad is computed.
Does anybody have more insight into this function?
EDIT:  Pointers to the code:

https://github.com/pytorch/pytorch/blob/master/torch/nn/grad.py#L164 69
https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/conv.py#L205 78