F.conv2d expects the inputs as:
input, weight, bias=None, stride=1, padding=0, dilation=1, groups=1

If you don’t have a bias parameter, you could either pass None to the conv2d call or pass the self.stride and self.padding using the keywords: stride=self.stride etc.