Sanster / pytorch-network-slimming

A package to make do Network Slimming a little easier
47 stars 10 forks source link

can not pruning following network with two continuous convolution block #5

Open anxu829 opened 3 years ago

anxu829 commented 3 years ago
class StrangeNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3,256,kernel_size=3)
        self.bn = nn.BatchNorm2d(256,256)
        self.conv2_1 = nn.Conv2d(256,128  , kernel_size=3)
        self.conv2_2 = nn.Conv2d(128,128 , kernel_size=3 )
        self.bn2 = nn.BatchNorm2d(128 )

    def forward(self, x):
        x = self.conv1(x)
        x = self.bn(x)
        x = self.conv2_1(x)
        x = self.conv2_2(x)
        x = self.bn2(x)
        return x
Sanster commented 2 years ago

change schema file manually。 check mobilenet_v3 related code/doc: