class_docstr: A simple class for encoding.
  
  This class provides functionality for encoding in the "one-to-many" case,
  where a `Tensor` is encoded in one location, and is to be decoded at
  potentially many other locations, leaving the communication between encoding
  and decoding up to the user.
  
  An instance of `SimpleEncoder` is capable of encoding only values of a shape
  and dtype, as specified at construction time. For example, an separate
  instance of this class should be used for encoding every `Variable` of a
  model, as opposed to a single instance being reused for each `Variable`.
  
  `SimpleEncoder` exposes the state of the underlying encoder, and the user is
  responsible for keeping track of the state in case the encoding should be
  adaptive as part of an iterative process. If state is not needed, it can be
  simply ignored when calling the `encode` method.
docstr: Returns `tf.TensorSpec` describing input expected by `SimpleEncoder`.
docstr_tok: ["Returns","`","tf.TensorSpec","`","describing","input","expected","by","`","SimpleEncoder","`","."]
code: def input_tensorspec(self):
      """Returns `tf.TensorSpec` describing input expected by `SimpleEncoder`."""
      return self._tensorspec
  
file_path: model-optimization/tensorflow_model_optimization/python/core/internal/tensor_encoding/core/simple_encoder.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import tensorflow
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.core import core_encoder
  from tensorflow_model_optimization.python.core.internal.tensor_encoding.utils import py_utils
label_desc: Use image node_id 2 for calling the SimpleEncoder obj's underlying member method code with example usage: obj.input_tensorspec() and returns: self