class_docstr: Encoding stage taking the difference between a sequence of integers.
  
  This encoding stage can be useful when the original integers can be large, but
  the difference of the integers are much smaller values and have a more compact
  representation. For example, it can be combined with the
  `SplitBySmallValueEncodingStage` to further compress the increasing sequence
  of indices.
  
  The encode method expects a tensor with 1 dimension and with integer dtype.
docstr: See base class.
docstr_tok: ["See","base","class","."]
code: def encode(self, x, encode_params):
      """See base class."""
      del encode_params  # Unused.
      if x.shape.ndims != 1:
          raise ValueError(
              "Number of dimensions must be 1. Shape of x: %s" % x.shape
          )
      if not x.dtype.is_integer:
          raise TypeError(
              "Unsupported input type: %s. Support only integer types."
              % x.dtype
          )
  
      diff_x = x - tf.concat([[0], x[:-1]], 0)
      return collections.OrderedDict(
          [(self.ENCODED_VALUES_KEY, diff_x)]
      )
  
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 encoding_stage
label_desc: Use image node_id 6 for calling the DifferenceBetweenIntegersEncodingStage obj's underlying member method code with example usage: obj.encode(x, encode_params) and returns: collections