I understand the underlying concept about calculating dimensions from a fully connected layer in a CNN. However, i am wondering if there is a smarter way to compute those.I mean, in a big network, it is a pain to calculate these dimensions. Please advice.
By fully conected layer in a cnn,i mean:
self.conv1 = nn.Conv2d(1, 10, kernel_size=5) self.conv2 = nn.Conv2d(10, 20, kernel_size=5) -->> self.fc1 = nn.Linear(320, 50) self.fc2 = nn.Linear(50, 10)