class_docstr: Clip tensor
  
  Args:
      clip_value_min: A number or tensor of lower bound to clip
      clip_value_max: A number of tensor of upper bound to clip
      learn_min: A boolean. If True, learn min. clip_value_min will be used to initialize. Default False
      learn_max: A boolean. Similar as learn_min but for max.
  
  Raises:
      ValueError:
code: def __init__(
      self,
      clip_value_min,
      clip_value_max,
      learn_min=False,
      learn_max=False,
  ):
      super(Clip, self).__init__()
  
      if learn_max:
          if (
              not isinstance(clip_value_max, float)
              and clip_value_max.size != 1
          ):
              raise ValueError(
                  "clip_value_min/clip_value_max must be scalar for initilizing"
                  " learnable range."
              )
          self.clip_value_max = Parameter(
              torch.tensor(clip_value_max)
          )  # pylint: disable=not-callable
      else:
          self.clip_value_max = clip_value_max
  
file_path: lightseq/lightseq/csrc/pytorch/pytorch_quantization/nn/modules/clip.py
imports: import torch
  from torch import nn
  from torch.nn.parameter import Parameter
  from csrc.pytorch.pytorch_quantization.nn import functional
label_desc: Use image node_id 1 to create a new Clip object from inherited base classes: nn with example: obj = Clip(clip_value_min, clip_value_max, learn_min, learn_max)