# Codeblock 2 class ConvBlock(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, padding): super().__init__() self.conv = nn.Conv2d(in_channels=in_channels, out_channels=out_channels, kernel_size=kernel_size, padding=padding) self.bn = nn.BatchNorm2d(num_features=out_channels) self.leaky_relu = nn.LeakyReLU(negative_slope=0.1) #(1) def forward(self, x): print(f'original\t: {x.size()}') x = self.conv(x) print(f'after conv\t: {x.size()}') x = self.leaky_relu(x) print(f'after leaky relu: {x.size()}') return x