Solved by ptrblck in post #2 
              
              
                You could use the same approach, but call F.conv2d instead of torch.mm to perform a convolution. 
Also, the input and weight shapes would be different, since F.conv2d expects an input of [batch_size, channels, height, width] and a weight of [out_channels, in_channels, height, width].