(self, module)
Applies compression scheme to module.
    
        :param module: PyTorch module.
        :type module: `torch.nn.Module`
Applies compression scheme to module.
    
        :param module: PyTorch module.
        :type module: `torch.nn.Module`
Applies compression scheme to module . : param module : PyTorch module . : type module : torch . nn . Module
def pi(self, module):
        """
        Applies compression scheme to module.
    
        :param module: PyTorch module.
        :type module: `torch.nn.Module`
        """
        threshold = self.threshold(module)
        for m in module.modules():
            if isinstance(m, torch.nn.Linear) and not hasattr(
                    m, 'condensa_nocompress'):
                condensa.neuron_prune(m,
                                      threshold,
                                      align=self.align,
                                      criteria=self.criteria,
                                      prune_bias=self.prune_bias)
            if isinstance(m, torch.nn.Conv2d) and not hasattr(
                    m, 'condensa_nocompress'):
                condensa.filter_prune(m,
                                      threshold,
                                      align=self.align,
                                      criteria=self.criteria,
                                      prune_bias=self.prune_bias)
def pi ( self , module ) : threshold = self . threshold ( module ) for m in module . modules ( ) : if isinstance ( m , torch . nn . Linear ) and not hasattr ( m , 'condensa_nocompress' ) : condensa . neuron_prune ( m , threshold , align = self . align , criteria = self . criteria , prune_bias = self . prune_bias ) if isinstance ( m , torch . nn . Conv2d ) and not hasattr ( m , 'condensa_nocompress' ) : condensa . filter_prune ( m , threshold , align = self . align , criteria = self . criteria , prune_bias = self . prune_bias )