토니의 연습장

Conv2d / ConvTranspose2d 본문

AI 일반/모델, 아키텍처, 구현

Conv2d / ConvTranspose2d

bellmake 2024. 9. 19. 14:47
# For nn.Conv2d: (reduce the size of the image for prediction : Discriminator)
output_size = (n + 2 * pad - ks) // stride + 1

# For nn.ConvTranspose2d: (grow from a value to full image for generation : Generator)
output_size = (n - 1) * stride - 2 * padding + ks