code: def pruneWeights(self, minWeight):
      
      if minWeight == 0.0:
        return
  
      # Collect all weights
      weights = [v for k, v in self.named_parameters() if 'weight' in k]
      for w in weights:
        # Filter weights above threshold
        mask = torch.ge(torch.abs(w.data), minWeight)
        # Zero other weights
        w.data.mul_(mask.type(torch.float32))
docs: Prune all the weights whose absolute magnitude is less than minWeight
      :param minWeight: min weight to prune. If zero then no pruning
      :type minWeight: float