我应该在哪里找到pytorch函数conv2d的源代码?
它应该在torch.nn.functional中,但如果我搜索conv2d,只会找到_add_docstr行。我在这里看过:
https://github.com/pytorch/pytorch/blob/master/torch/nn/functional.py
更新: 不是我的打字错误,我确实是指函数。 Conv2d类使用nn.functional中的conv2d函数。
在这里:
https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/conv.py
第338行:
return F.conv2d(F.pad(input, expanded_padding, mode='circular')
F是他们导入函数式编程的方式
于是我去了那里,但是我没有找到那段代码。