class_docstr: Initializer that restores tensors from a checkpoint.
class_docstr_tok: ["Initializer","that","restores","tensors","from","a","checkpoint","."]
code: def __call__(self, shape, dtype=None, partition_info=None):
      # Creating different RestoreV2 ops when a single one could
      # output several tensors seems inefficient, but that's actually
      # what tf.Saver.restore_op (via tf.BaseSaverBuilder) does too.
      if self._scope is None:
          scope_name = tf.get_variable_scope().name
      elif callable(self._scope):
          scope_name = self._scope(tf.get_variable_scope().name)
      else:
          scope_name = self._scope
      tensor_name = self._var_name
      if scope_name:
          tensor_name = "{}/{}".format(scope_name, tensor_name)
      tensor = io_ops.restore_v2(
          self._filename,
          [tensor_name],
          [self._partition_spec(shape, partition_info)],
          [dtype],
      )[0]
      tensor.set_shape(shape)
      return tensor
  
file_path: NiftyNet/niftynet/utilities/restore_initializer.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import io_ops
label_desc: Use image node_id 3 for calling the _Restore obj's underlying member method code with example usage: obj.__call__(shape, dtype, partition_info) and returns: tensor