class_docstr: Entropy model for Laplace distributed random variables.
  
  This entropy model handles quantization and compression of a bottleneck tensor
  and implements a penalty that encourages compressibility under the Rice
  code.
  
  Given a signed integer, `run_length_encode` encodes zeros using a
  run-length code, the sign using a uniform bit, and applies the Rice code to
  the magnitude.
  
  The penalty applied by this class is given by:
  ```
  l1 * reduce_sum(abs(x))
  ```
  This encourages `x` to follow a symmetrized laplace distribution.
class_docstr_tok: ["Entropy","model","for","Laplace","distributed","random","variables",".","This","entropy","model","handles","quantization","and","compression","of","a","bottleneck","tensor","and","implements","a","penalty","that","encourages","compressibility","under","the","Rice","code",".","Given","a","signed","integer",",","`","run_length_encode","`","encodes","zeros","using","a","run-length","code",",","the","sign","using","a","uniform","bit",",","and","applies","the","Rice","code","to","the","magnitude",".","The","penalty","applied","by","this","class","is","given","by",":","``","`","l1","*","reduce_sum","(","abs","(","x",")",")","``","`","This","encourages","`","x","`","to","follow","a","symmetrized","laplace","distribution","."]
docstr: Decompresses a tensor.
  
  Reconstructs the quantized tensor from bit strings produced by `compress()`.
  
  Args:
    strings: `tf.Tensor` containing the compressed bit strings.
    code_shape: Shape of innermost dimensions of the output `tf.Tensor`.
  
  Returns:
    A `tf.Tensor` of shape `tf.shape(strings) + code_shape`.
docstr_tok: ["Decompresses","a","tensor",".","Reconstructs","the","quantized","tensor","from","bit","strings","produced","by","`","compress","(",")","`",".","Args",":","strings",":","`","tf.Tensor","`","containing","the","compressed","bit","strings",".","code_shape",":","Shape","of","innermost","dimensions","of","the","output","`","tf.Tensor","`",".","Returns",":","A","`","tf.Tensor","`","of","shape","`","tf.shape","(","strings",")","+","code_shape","`","."]
code: def decompress(self, strings, code_shape):
      """Decompresses a tensor.
  
      Reconstructs the quantized tensor from bit strings produced by `compress()`.
  
      Args:
        strings: `tf.Tensor` containing the compressed bit strings.
        code_shape: Shape of innermost dimensions of the output `tf.Tensor`.
  
      Returns:
        A `tf.Tensor` of shape `tf.shape(strings) + code_shape`.
      """
      strings = tf.convert_to_tensor(strings, dtype=tf.string)
      strings_shape = tf.shape(strings)
      symbols = tf.map_fn(
          lambda x: self.decode_fn(x, code_shape),
          tf.reshape(strings, [-1]),
          fn_output_signature=tf.TensorSpec(
              [None] * self.coding_rank, dtype=tf.int32
          ),
      )
      symbols = tf.reshape(
          symbols, tf.concat([strings_shape, code_shape], 0)
      )
      return tf.cast(symbols, self.bottleneck_dtype)
  
file_path: compression/tensorflow_compression/python/entropy_models/laplace.py
imports: import tensorflow
  from tensorflow_compression.python.ops import gen_ops
  from tensorflow_compression.python.ops import round_ops
label_desc: Use image node_id 14 for calling the LaplaceEntropyModel obj's underlying member method code with example usage: obj.decompress(strings, code_shape) and returns: tf