class_docstr: Clips gradient norm of an iterable of parameters.
class_docstr_tok: ["Clips","gradient","norm","of","an","iterable","of","parameters","."]
code: def step(self, parameters):
      l = [p.grad for p in parameters if p.grad is not None]
      total_norm, _ = multi_tensor_applier(
          self.multi_tensor_l2norm, self._overflow_buf, [l], False
      )
      total_norm = total_norm.item()
      if total_norm == float("inf"):
          return
      clip_coef = self.max_norm / (total_norm + 1e-6)
      if clip_coef < 1:
          multi_tensor_applier(
              self.multi_tensor_scale,
              self._overflow_buf,
              [l, l],
              clip_coef,
          )
  
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 2 for calling the GradientClipper obj's underlying member method code with example usage: obj.step(parameters) without return types