Conv2D input and output shape

I have created a variable conv1 = nn.Conv2d with in_channels = 256, out_channels = 3, kernel_size = 3, and stride = 1. Other method arguments are set by default. I would like to get the input and output shape of this convolution. I tried using conv1.shape and conv1.size() but the error thrown back says no such attribute found. While I can take calculate it by the formula given in the documentation, I would like to directly call a function. Is this possible?

Just create a dummy input and pass into the conv layer and check the output size

Can you pass in an arbitrary size input first and post the result here? We might be able to you then if you don’t get it.