class_docstr: Clips gradient norm of an iterable of parameters.
class_docstr_tok: ["Clips","gradient","norm","of","an","iterable","of","parameters","."]
code: def __init__(self, max_grad_norm):
      self.max_norm = max_grad_norm
      if multi_tensor_applier.available:
          import amp_C
  
          self._overflow_buf = torch.cuda.IntTensor([0])
          self.multi_tensor_l2norm = amp_C.multi_tensor_l2norm
          self.multi_tensor_scale = amp_C.multi_tensor_scale
      else:
          raise RuntimeError(
              "Gradient clipping requires cuda extensions"
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import collections
  import logging
  import json
  import math
  import os
  import random
  import pickle
  from tqdm import tqdm, trange
  from utils import get_argument_parser, get_summary_writer, write_summary_events, is_time_to_exit, check_early_exit_warning
  import numpy
  import torch
  from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler
  from torch.utils.data.distributed import DistributedSampler
  from pytorch_pretrained_bert.tokenization import whitespace_tokenize, BasicTokenizer, BertTokenizer
  from pytorch_pretrained_bert.optimization import BertAdam
  from pytorch_pretrained_bert.file_utils import PYTORCH_PRETRAINED_BERT_CACHE
  from apex import amp
  from turing.nvidia_modeling import BertForQuestionAnswering, BertConfig
  from apex.multi_tensor_apply import multi_tensor_applier
label_desc: Use image node_id 1 to create a new GradientClipper object  with example: obj = GradientClipper(max_grad_norm)