Hi,
Can I get a specific apply of @safrooze answer when building a net . For example:
net = nn.HybridSequential()
net.add(
#conv_bn_block_0
nn.Conv2D(channels=16, kernel_size=3, strides=1, padding=1),
nn.BatchNorm(in_channels=16),
nn.LeakyReLU(0.1),
#max_pool_1
nn.MaxPool2D(2,2),
#conv_bn_block_2
nn.Conv2D(channels=32, kernel_size=3, strides=1, padding=1),
nn.BatchNorm(in_channels=32),
nn.LeakyReLU(0.1),
#max_pool_3
nn.MaxPool2D(2,2),
#conv_bn_block_4
nn.Conv2D(channels=64, kernel_size=3, strides=1, padding=1),
nn.BatchNorm(in_channels=64),
nn.LeakyReLU(0.1),
#max_pool_5
nn.MaxPool2D(2,2),
#conv_bn_block_6
nn.Conv2D(channels=128, kernel_size=3, strides=1, padding=1),
nn.BatchNorm(in_channels=128),
nn.LeakyReLU(0.1),
#max_pool_7
nn.MaxPool2D(2,2),
#conv_bn_block_8
nn.Conv2D(channels=256, kernel_size=3, strides=1, padding=1),
nn.BatchNorm(in_channels=256),
nn.LeakyReLU(0.1),
#max_pool_9
nn.MaxPool2D(2,2),
#conv_bn_block_10
nn.Conv2D(channels=512, kernel_size=3, strides=1, padding=1),
nn.BatchNorm(in_channels=512),
nn.LeakyReLU(0.1),
#max_pool_11
nn.MaxPool2D(2,1,padding=1) #At this step, we want the output to have size of (1,512,13,13), inputsize = (1,512,13,13)
)
net.initialize(init.Xavier(),ctx = ctx)
With input size of (1,3,416,416), after passing block 10, the output shape would be (1, 512, 13, 13).
How can I get the same size after passing through block 11 ?
Summary
This text will be hidden