class_docstr: Base class for a model description.
  
  It is used for the simple training interface described in
  `Training Interface Tutorial <https://tensorpack.readthedocs.io/tutorial/training-interface.html>`_.
  
  Subclass is expected to implement :meth:`inputs` and :meth:`build_graph`, as they
  together define a tower function.
docstr: Returns:
      A list of :class:`tf.TensorSpec`, which describes the inputs of this model.
      The result is cached for each instance of :class:`ModelDescBase`.
docstr_tok: ["Returns",":","A","list","of",":","class",":","`","tf.TensorSpec","`",",","which","describes","the","inputs","of","this","model",".","The","result","is","cached","for","each","instance","of",":","class",":","`","ModelDescBase","`","."]
code: def get_input_signature(self):
      """
      Returns:
          A list of :class:`tf.TensorSpec`, which describes the inputs of this model.
          The result is cached for each instance of :class:`ModelDescBase`.
      """
      with tf.Graph().as_default() as G:  # create these placeholder in a temporary graph
          inputs = self.inputs()
          assert isinstance(
              inputs, (list, tuple)
          ), "ModelDesc.inputs() should return a list of tf.TensorSpec objects! Got {} instead.".format(
              str(inputs)
          )
          if isinstance(inputs[0], tf.Tensor):
              for p in inputs:
                  assert (
                      "Placeholder" in p.op.type
                  ), "inputs() have to return TensorSpec or placeholders! Found {} instead.".format(
                      p
                  )
                  assert (
                      p.graph == G
                  ), "Placeholders returned by inputs() should be created inside inputs()!"
          return [
              TensorSpec(
                  shape=p.shape,
                  dtype=p.dtype,
                  name=get_op_tensor_name(p.name)[0],
              )
              for p in inputs
          ]
  
file_path: tensorpack/tensorpack/train/model_desc.py
imports: import tensorflow
  from ..utils.argtools import memoized_method
  from ..tfutils.common import get_op_tensor_name
  from ..tfutils.tower import get_current_tower_context
  from ..compat import _backport_tensor_spec, tfv1
label_desc: Use image node_id 1 for calling the ModelDescBase obj's underlying member method code with example usage: obj.get_input_signature() and returns: unknown