class_docstr: Indexed entropy model for location-scale family of random variables.
  
  This class is a common special case of `ContinuousIndexedEntropyModel`. The
  specified distribution is parameterized with `num_scales` values of scale
  parameters. An element-wise location parameter is handled by shifting the
  distributions to zero.
  
  This method is illustrated in Figure 10 of:
  > "Nonlinear Transform Coding"<br />
  > J. Ballé, P.A. Chou, D. Minnen, S. Singh, N. Johnston, E. Agustsson,
  > S.J. Hwang, G. Toderici<br />
  > https://doi.org/10.1109/JSTSP.2020.3034501
  
  Note: this only works for shift-invariant `tfpd.Distribution` objects, where
  the `loc` parameter really denotes a translation (i.e., not for the log-normal
  distribution).
docstr: Compresses a floating-point tensor.
  
  Compresses the tensor to bit strings. `bottleneck` is first quantized
  as in `quantize()`, and then compressed using the probability tables derived
  from `indexes`. The quantized tensor can later be recovered by calling
  `decompress()`.
  
  The innermost `self.coding_rank` dimensions are treated as one coding unit,
  i.e. are compressed into one string each. Any additional dimensions to the
  left are treated as batch dimensions.
  
  Args:
    bottleneck: `tf.Tensor` containing the data to be compressed.
    scale_indexes: `tf.Tensor` indexing the scale parameter for each element
      in `bottleneck`. Must have the same shape as `bottleneck`.
    loc: `None` or `tf.Tensor`. If `None`, the location parameter for all
      elements is assumed to be zero. Otherwise, specifies the location
      parameter for each element in `bottleneck`. Must have the same shape as
      `bottleneck`.
  
  Returns:
    A `tf.Tensor` having the same shape as `bottleneck` without the
    `self.coding_rank` innermost dimensions, containing a string for each
    coding unit.
docstr_tok: ["Compresses","a","floating-point","tensor",".","Compresses","the","tensor","to","bit","strings",".","`","bottleneck","`","is","first","quantized","as","in","`","quantize","(",")","`",",","and","then","compressed","using","the","probability","tables","derived","from","`","indexes","`",".","The","quantized","tensor","can","later","be","recovered","by","calling","`","decompress","(",")","`",".","The","innermost","`","self.coding_rank","`","dimensions","are","treated","as","one","coding","unit",",","i.e",".","are","compressed","into","one","string","each",".","Any","additional","dimensions","to","the","left","are","treated","as","batch","dimensions",".","Args",":","bottleneck",":","`","tf.Tensor","`","containing","the","data","to","be","compressed",".","scale_indexes",":","`","tf.Tensor","`","indexing","the","scale","parameter","for","each","element","in","`","bottleneck","`",".","Must","have","the","same","shape","as","`","bottleneck","`",".","loc",":","`","None","`","or","`","tf.Tensor","`",".","If","`","None","`",",","the","location","parameter","for","all","elements","is","assumed","to","be","zero",".","Otherwise",",","specifies","the","location","parameter","for","each","element","in","`","bottleneck","`",".","Must","have","the","same","shape","as","`","bottleneck","`",".","Returns",":","A","`","tf.Tensor","`","having","the","same","shape","as","`","bottleneck","`","without","the","`","self.coding_rank","`","innermost","dimensions",",","containing","a","string","for","each","coding","unit","."]
code: def compress(self, bottleneck, scale_indexes, loc=None):
      """Compresses a floating-point tensor.
  
      Compresses the tensor to bit strings. `bottleneck` is first quantized
      as in `quantize()`, and then compressed using the probability tables derived
      from `indexes`. The quantized tensor can later be recovered by calling
      `decompress()`.
  
      The innermost `self.coding_rank` dimensions are treated as one coding unit,
      i.e. are compressed into one string each. Any additional dimensions to the
      left are treated as batch dimensions.
  
      Args:
        bottleneck: `tf.Tensor` containing the data to be compressed.
        scale_indexes: `tf.Tensor` indexing the scale parameter for each element
          in `bottleneck`. Must have the same shape as `bottleneck`.
        loc: `None` or `tf.Tensor`. If `None`, the location parameter for all
          elements is assumed to be zero. Otherwise, specifies the location
          parameter for each element in `bottleneck`. Must have the same shape as
          `bottleneck`.
  
      Returns:
        A `tf.Tensor` having the same shape as `bottleneck` without the
        `self.coding_rank` innermost dimensions, containing a string for each
        coding unit.
      """
      if loc is not None:
          bottleneck -= loc
      return super().compress(bottleneck, scale_indexes)
  
imports: import tensorflow
  from tensorflow_compression.python.entropy_models import continuous_base
  from tensorflow_compression.python.ops import gen_ops
  from tensorflow_compression.python.ops import math_ops
  from tensorflow_compression.python.ops import round_ops
label_desc: Use image node_id 4 for calling the LocationScaleIndexedEntropyModel obj's underlying member method code with example usage: obj.compress(bottleneck, scale_indexes, loc) and returns: super