class_docstr: This collector has a list of all gradients, collected when
  constructing the tf graph. The gradient from multiple GPUs
  will be averaged, and the averaged op is added to graph
  by application driver
code: def __init__(self, n_devices=1):
      self._gradients = []
      self.n_devices = n_devices
  
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from tensorflow.contrib.framework import list_variables
  from niftynet.io.misc_io import image3_axial, image3_coronal, image3_sagittal, resolve_checkpoint
  from niftynet.utilities import util_common
  from niftynet.utilities.restore_initializer import restore_initializer
label_desc: Use image node_id 1 to create a new GradientsCollector object from inherited base classes: object with example: obj = GradientsCollector(n_devices)