class_docstr: This class implements several methods to keep track of intermediate
  variables.
  
  This is useful for eg. visualizing or retrieving gradients wrt. inputs
  later on
class_docstr_tok: ["This","class","implements","several","methods","to","keep","track","of","intermediate","variables",".","This","is","useful","for","eg",".","visualizing","or","retrieving","gradients","wrt",".","inputs","later","on"]
docstr: Adds variable to the tracker
  
  Specify `retain_grad=True` to retrieve the gradient later.
docstr_tok: ["Adds","variable","to","the","tracker","Specify","`","retain_grad=True","`","to","retrieve","the","gradient","later","."]
code: def track(self, variable, name, retain_grad=False):
      """Adds variable to the tracker
  
      Specify `retain_grad=True` to retrieve the gradient later."""
      if retain_grad:
          variable.retain_grad()
      self.tracker[name] = variable
  
imports: import abc
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.models import FairseqIncrementalDecoder, transformer
  from pytorch_translate import rnn_cell, utils, vocab_reduction
  from pytorch_translate.research.lexical_choice import lexical_translation
label_desc: Use image node_id 3 for calling the VariableTracker obj's underlying member method code with example usage: obj.track(variable, name, retain_grad) without return types