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: Data type of the bottleneck tensor.
docstr_tok: ["Data","type","of","the","bottleneck","tensor","."]
code: def bottleneck_dtype(self):
      """Data type of the bottleneck tensor."""
      return 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 6 for calling the LaplaceEntropyModel obj's underlying member method code with example usage: obj.bottleneck_dtype() and returns: self