class_docstr: Base class for coding experiment.
class_docstr_tok: ["Base","class","for","coding","experiment","."]
docstr: Determines an equivalent vector quantizer for `x`.
  
  Args:
    x: A batch of source vectors.
  
  Returns:
    codebook: A codebook of vectors used to represent all elements of `x`.
    rates: For each codebook vector, the self-information in bits needed to
      encode it.
    indexes: Integer `Tensor`. For each batch element in `x`, returns the
      index into `codebook` that it is represented as.
docstr_tok: ["Determines","an","equivalent","vector","quantizer","for","`","x","`",".","Args",":","x",":","A","batch","of","source","vectors",".","Returns",":","codebook",":","A","codebook","of","vectors","used","to","represent","all","elements","of","`","x","`",".","rates",":","For","each","codebook","vector",",","the","self-information","in","bits","needed","to","encode","it",".","indexes",":","Integer","`","Tensor","`",".","For","each","batch","element","in","`","x","`",",","returns","the","index","into","`","codebook","`","that","it","is","represented","as","."]
code: def quantize(self, x):
      """Determines an equivalent vector quantizer for `x`.
  
      Args:
        x: A batch of source vectors.
  
      Returns:
        codebook: A codebook of vectors used to represent all elements of `x`.
        rates: For each codebook vector, the self-information in bits needed to
          encode it.
        indexes: Integer `Tensor`. For each batch element in `x`, returns the
          index into `codebook` that it is represented as.
      """
  
file_path: compression/models/toy_sources/compression_model.py
imports: import abc
  import matplotlib.pyplot
  import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling the CompressionModel obj's underlying member method code with example usage: obj.quantize(x) without return types