zoo/mobilenet/mobilenet_v3_c.py
def squeeze(self, x, **metaparameters):
        """ Construct a squeeze block
            x   : input to the squeeze
        """
        if 'activation' in metaparameters:
            del metaparameters['activation']
        
        shortcut = x
        n_channels = x.shape[-1]

        x = GlobalAveragePooling2D()(x)
        x = self.Dense(x, n_channels, activation=self.ReLU, use_bias=False, **metaparameters)
        x = self.Dense(x, n_channels, activation=self.HS, use_bias=False, **metaparameters)
        x = Reshape((1, 1, n_channels))(x)
        x = Multiply()([shortcut, x])
        return x
 Construct a squeeze block
            x   : input to the squeeze
        
Construct a squeeze block
x   : input to the squeeze
Construct a squeeze block x : input to the squeeze
def squeeze(self, x, **metaparameters):
        if 'activation' in metaparameters:
            del metaparameters['activation']
        shortcut = x
        n_channels = x.shape[-1]
        x = GlobalAveragePooling2D()(x)
        x = self.Dense(x, n_channels, activation=self.ReLU, use_bias=False, **metaparameters)
        x = self.Dense(x, n_channels, activation=self.HS, use_bias=False, **metaparameters)
        x = Reshape((1, 1, n_channels))(x)
        x = Multiply()([shortcut, x])
        return x
def squeeze ( self , x , ** metaparameters ) : if 'activation' in metaparameters : del metaparameters [ 'activation' ] shortcut = x n_channels = x . shape [ - 1 ] x = GlobalAveragePooling2D ( ) ( x ) x = self . Dense ( x , n_channels , activation = self . ReLU , use_bias = False , ** metaparameters ) x = self . Dense ( x , n_channels , activation = self . HS , use_bias = False , ** metaparameters ) x = Reshape ( ( 1 , 1 , n_channels ) ) ( x ) x = Multiply ( ) ( [ shortcut , x ] ) return x
Construct a squeeze block
x   : input to the squeeze
Construct a squeeze block x : input to the squeeze
""" Construct a squeeze block
            x   : input to the squeeze
        """
self
x