zoo/mobilenet/mobilenet_v3_c.py
def classifier(self, x, n_classes):
        """ Construct the classifier group
            x         : input to the classifier
            n_classes : number of output classes
        """
        # Save encoding layer
        self.encoding = x

        # 7x7 Pooling
        n_channels = x.shape[-1]
        x = GlobalAveragePooling2D()(x)

        # Save embedding layer
        self.embedding = x
        
        x = Reshape((1, 1, n_channels))(x)

        x = self.Conv2D(x, 1280, (1, 1), padding='same', activation=self.HS, use_bias=True)

        # final classification
        x = self.Conv2D(x, n_classes, (1, 1), padding='same', activation='softmax', use_bias=True)
        # Flatten the feature maps into 1D feature maps (?, N)
        outputs = Reshape((n_classes,))(x)

        # Save post-activation layer
        self.softmax = outputs

        return outputs
 Construct the classifier group
            x         : input to the classifier
            n_classes : number of output classes
        
Construct the classifier group
x         : input to the classifier
n_classes : number of output classes
Construct the classifier group x : input to the classifier n_classes : number of output classes
def classifier(self, x, n_classes):
        self.encoding = x
        n_channels = x.shape[-1]
        x = GlobalAveragePooling2D()(x)
        self.embedding = x
        x = Reshape((1, 1, n_channels))(x)
        x = self.Conv2D(x, 1280, (1, 1), padding='same', activation=self.HS, use_bias=True)
        x = self.Conv2D(x, n_classes, (1, 1), padding='same', activation='softmax', use_bias=True)
        outputs = Reshape((n_classes,))(x)
        self.softmax = outputs
        return outputs
def classifier ( self , x , n_classes ) : self . encoding = x n_channels = x . shape [ - 1 ] x = GlobalAveragePooling2D ( ) ( x ) self . embedding = x x = Reshape ( ( 1 , 1 , n_channels ) ) ( x ) x = self . Conv2D ( x , 1280 , ( 1 , 1 ) , padding = 'same' , activation = self . HS , use_bias = True ) x = self . Conv2D ( x , n_classes , ( 1 , 1 ) , padding = 'same' , activation = 'softmax' , use_bias = True ) outputs = Reshape ( ( n_classes , ) ) ( x ) self . softmax = outputs return outputs
Construct the classifier group
x         : input to the classifier
n_classes : number of output classes
Construct the classifier group x : input to the classifier n_classes : number of output classes
""" Construct the classifier group
            x         : input to the classifier
            n_classes : number of output classes
        """ # Save encoding layer # 7x7 Pooling # Save embedding layer # final classification # Flatten the feature maps into 1D feature maps (?, N) # Save post-activation layer
self
x
n_classes