(self, density)
Creates a `Prune` instance.

        :param density: Target density.
        :type density: `float`
Creates a `Prune` instance.
Creates a Prune instance .
def __init__(self, density):
        """
        Creates a `Prune` instance.

        :param density: Target density.
        :type density: `float`
        """
        self.density = density
        self.layer_types = [torch.nn.Linear, torch.nn.Conv2d]
def __init__ ( self , density ) : self . density = density self . layer_types = [ torch . nn . Linear , torch . nn . Conv2d ]