Where to find python source code definition of nn.Conv2d

Hello, I need to write a Conv2d module like nn.Conv2d but must inherit from nn.module instead of nn.Conv2d for some reason. Can anyone tell me how to find the python source code definition of nn.Conv2d? I can’t find it on github. Thanks for your help.

the top layer is in pytorch/conv.py at master · pytorch/pytorch · GitHub

1 Like