class_docstr: Base class for hyperprior autoencoder.
  
  This base class wraps a number of utility functions for working with
  Balle-style compression autoencoders implemented in the style of
  CompressAI, such as parameter collection and device management. Users are
  expected to subclass this calss before writing the appropriate PyTorch
  operations.
class_docstr_tok: ["Base","class","for","hyperprior","autoencoder",".","This","base","class","wraps","a","number","of","utility","functions","for","working","with","Balle-style","compression","autoencoders","implemented","in","the","style","of","CompressAI",",","such","as","parameter","collection","and","device","management",".","Users","are","expected","to","subclass","this","calss","before","writing","the","appropriate","PyTorch","operations","."]
docstr: Quantization with straight-through estimator.
  
  If the means are passed, then the input is first mean-shifted prior to
  quantization. Internally, the function uses the ``quantize_ste``
  function from CompressAI.
  
  Args:
      latent: The latent to quantize.
      means: Values to shift latent by prior to quantization.
docstr_tok: ["Quantization","with","straight-through","estimator",".","If","the","means","are","passed",",","then","the","input","is","first","mean-shifted","prior","to","quantization",".","Internally",",","the","function","uses","the","``","quantize_ste","``","function","from","CompressAI",".","Args",":","latent",":","The","latent","to","quantize",".","means",":","Values","to","shift","latent","by","prior","to","quantization","."]
code: def _ste_quantize(
      self, latent: Tensor, means: Optional[Tensor] = None
  ) -> Tensor:
      """
      Quantization with straight-through estimator.
  
      If the means are passed, then the input is first mean-shifted prior to
      quantization. Internally, the function uses the ``quantize_ste``
      function from CompressAI.
  
      Args:
          latent: The latent to quantize.
          means: Values to shift latent by prior to quantization.
      """
      if means is None:
          return quantize_ste(latent)
      else:
          return quantize_ste(latent - means) + means
  
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from compressai.entropy_models import EntropyBottleneck
  from compressai.models import CompressionModel
  from compressai.ops import quantize_ste
  from torch import Tensor
  from neuralcompression import HyperpriorCompressedOutput, HyperpriorOutput
label_desc: Use image node_id 5 for calling the _HyperpriorAutoencoderBase obj's underlying member method code with example usage: obj._ste_quantize(latent, means) and returns: quantize_ste, unknown