Determine the size of feature maps in generator and discriminator?

Hi all!

I’m following this tutorial. DCGAN PyTorch, but I’m working with “image-like” tensors containing geographical data. The dimensions of the tensors are
[batch_size, 1 (as the channel is just a single float value, latitudes, longitudes].

How do I determine the size of feature maps once I get to the generator and discriminator classes?

Thank you!

Assuming you would like to calculate the shape of some intermediate output activations you could either calculate the output shape using the shape formula for e.g. nn.Conv2d, which is given in the docs or alternatively you could add print statements into the forward method and print out the shapes.