class_docstr: Uses PyTorch's :func:`~torch.nn.utils.clip_grad_norm_()`
  method to clip gradient.
  
  See:
      :func:`torch.nn.utils.clip_grad_norm_()`
code: def __init__(
      self,
      parameters: _tensor_or_tensors,
      max_norm: float,
      norm_type: float = 2.0,
  ):
      super().__init__()
      self.parameters = (
          list(parameters)
          if not torch.is_tensor(parameters)
          else [parameters]
      )
      self.max_norm = max_norm
      self.norm_type = norm_type
  
file_path: poutyne/poutyne/framework/callbacks/clip_grad.py
imports: from typing import Iterable, Union
  import torch
  from torch.nn.utils import clip_grad_norm_, clip_grad_value_
  from poutyne.framework.callbacks.callbacks import Callback
label_desc: Use image node_id 1 to create a new ClipNorm object from inherited base classes: Callback with example: obj = ClipNorm(parameters, max_norm, norm_type)