parameters: (t, dim)
docstring: r"""
      Args:
          t (torch.Tensor): tensor representing the parameter to prune
          dim (int): index of the dim along which we define channels to prune
docstring_summary: r"""
      Args:
          t (torch.Tensor): tensor representing the parameter to prune
          dim (int): index of the dim along which we define channels to prune
docstring_tokens: r Args : t ( torch . Tensor ) : tensor representing the parameter to prune dim ( int ) : index of the dim along which we define channels to prune
function: def _validate_pruning_dim(t, dim):
      r"""
      Args:
          t (torch.Tensor): tensor representing the parameter to prune
          dim (int): index of the dim along which we define channels to prune
      """
      if dim >= t.dim():
          raise IndexError("Invalid index {} for tensor of size {}".format(dim, t.shape))
function_tokens: def _validate_pruning_dim ( t , dim ) : if dim >= t . dim ( ) : raise IndexError ( "Invalid index {} for tensor of size {}" . format ( dim , t . shape ) )