If all Conv2d class attrs are correctly set, then this will be fine. However, when you need flexibility like this, I recommend using the functional form where you can manually pass in the weight and bias tensors (http://pytorch.org/docs/master/nn.html#torch.nn.functional.conv2d 150)