github.com
  
  
    pytorch/pytorch/blob/142c973f4179e768164cd578951489e89021b29c/torch/nn/modules/conv.py#L330-L338 11

def forward(self, input):
    if self.padding_mode == 'circular':
        expanded_padding = ((self.padding[1] + 1) // 2, self.padding[1] // 2,
                            (self.padding[0] + 1) // 2, self.padding[0] // 2)
        return F.conv2d(F.pad(input, expanded_padding, mode='circular'),
                        self.weight, self.bias, self.stride,
                        _pair(0), self.dilation, self.groups)
    return F.conv2d(input, self.weight, self.bias, self.stride,
                    self.padding, self.dilation, self.groups)



  
  
    
    
  
  


F.conv2d does not have the optional argument padding_mode.
https://pytorch.org/docs/stable/nn.html#torch.nn.functional.conv2d 46
This document for F.conv2d is wrong.