class_docstr: Prune entire (currently unpruned) channels in a tensor at random.
  
  Args:
      amount (int or float): quantity of parameters to prune.
          If ``float``, should be between 0.0 and 1.0 and represent the
          fraction of parameters to prune. If ``int``, it represents the
          absolute number of parameters to prune.
      dim (int, optional): index of the dim along which we define
          channels to prune. Default: -1.
class_docstr_tok: ["Prune","entire","(","currently","unpruned",")","channels","in","a","tensor","at","random",".","Args",":","amount","(","int","or","float",")",":","quantity","of","parameters","to","prune",".","If","``","float","``",",","should","be","between","0.0","and","1.0","and","represent","the","fraction","of","parameters","to","prune",".","If","``","int","``",",","it","represents","the","absolute","number","of","parameters","to","prune",".","dim","(","int",",","optional",")",":","index","of","the","dim","along","which","we","define","channels","to","prune",".","Default",":","-1","."]
code: def __init__(self, amount, dim=-1):
      # Check range of validity of amount
      _validate_pruning_amount_init(amount)
      self.amount = amount
      self.dim = dim
  
imports: import numbers
  from abc import ABC, abstractmethod
  from collections.abc import Iterable
  from typing import Tuple
  import torch
label_desc: Use image node_id 1 to create a new RandomStructured object from inherited base classes: BasePruningMethod with example: obj = RandomStructured(amount, dim)