HI i currently build CNN but im not sure how would i able to convert my 2D cnn so it able to process to linear can anyone help?
this is my code
class MobiFace2(nn.Module):
    def __init__(self, bottleneck_setting=MobiFace_bottleneck_setting, final_linear=False):
        super(MobiFace2, self).__init__()
        self.final_linear = final_linear

        self.conv1 = ConvBlock(3, 64, 3, 2, 1)

        self.dw_conv1 = ConvBlock(64, 64, 3, 1, 1, dw=True)

        self.conv3 = ConvBlock1(64, 64, 3, 1, 1, dw=True)

        self.conv4= ConvBlock5(64,128,3, 1, 1)

        self.conv5= ConvBlock5(128,256,3, 1, 1)

        self.conv6= ConvBlock5(256,512,3, 1, 1)

        self.conv7 = ConvBlock(256, 512, 1, 1, 0, linear=True)

        self.linear1 = nn.Linear(not sure*not sure*512, 512)



    def forward(self, x):
        x = self.conv1(x)
        x = self.dw_conv1(x)
        x= self.conv3(x)
        x=self.conv4(x)
        x= self.conv5(x)
        x=self.conv6(x)
        x=self.conv7(x)
        x = x.view(x.size(0), -1)
        x = self.linear1(x)
        


        return x