Open hz1z opened 1 month ago
class PFC(nn.Module): def __init__(self,channels, kernel_size=7): super(PFC, self).__init__() self.input_layer = nn.Sequential( nn.Conv2d(3, channels, kernel_size, padding= kernel_size // 2), #nn.Conv2d(3, channels, kernel_size=3, padding= 1), nn.ReLU(inplace=True), nn.BatchNorm2d(channels)) self.depthwise = nn.Sequential( nn.Conv2d(channels, channels, kernel_size, groups=channels, padding= kernel_size // 2), nn.ReLU(inplace=True), nn.BatchNorm2d(channels)) self.pointwise = nn.Sequential( nn.Conv2d(channels, channels, kernel_size=1), nn.ReLU(inplace=True), nn.BatchNorm2d(channels)) def forward(self, x): x = self.input_layer(x) residual = x x = self.depthwise(x) x += residual x = self.pointwise(x) return x
为什么这里第一个input_layer的kernel size是7而不是论文里写的3*3,是我哪里看错了吗
为什么这里第一个input_layer的kernel size是7而不是论文里写的3*3,是我哪里看错了吗