class_docstr: Optimizer hook function for gradient clipping.
  
  This hook function scales all gradient arrays to fit to the defined L2 norm
  threshold.
  
  Args:
      threshold (float): L2 norm threshold.
  
  Attributes:
      ~optimizer_hooks.GradientClipping.threshold (float): L2
                       norm threshold of gradient norm.
      ~optimizer_hooks.GradientClipping.timing (string): Specifies
                       when this hook should be
                       called by the Optimizer/UpdateRule. Valid values are
                       'pre' (before any updates) and 'post' (after any
                       updates).
  
  .. versionadded:: 4.0.0
     The *timing* parameter.
code: def __init__(self, threshold):
      self.threshold = threshold
  
file_path: chainer/chainer/optimizer_hooks/gradient_clipping.py
imports: import collections
  import numpy
  import six
  import chainer
  from chainer import backend
label_desc: Use image node_id 1 to create a new GradientClipping object from inherited base classes: object with example: obj = GradientClipping(threshold)