(self, model)
Zeroes out model parameters.
    
        :param model: PyTorch model.
        :type model: torch.nn.Module
Zeroes out model parameters.
    
        :param model: PyTorch model.
        :type model: torch.nn.Module
Zeroes out model parameters . : param model : PyTorch model . : type model : torch . nn . Module
def zero_(self, model):
        """
        Zeroes out model parameters.
    
        :param model: PyTorch model.
        :type model: torch.nn.Module
        """
        with torch.no_grad():
            pflat = torch.nn.utils.parameters_to_vector(
                model.parameters()).fill_(0.)
            torch.nn.utils.vector_to_parameters(pflat, model.parameters())
def zero_ ( self , model ) : with torch . no_grad ( ) : pflat = torch . nn . utils . parameters_to_vector ( model . parameters ( ) ) . fill_ ( 0. ) torch . nn . utils . vector_to_parameters ( pflat , model . parameters ( ) )