class_docstr: Coding `input - round(mean)` using `mean - round(mean)`
docstr: Compress `inputs` tensor to string
  
  Args:
      inputs: input tensor (floats) to compress
      scales: tensor (floats) of scales
      means: tensor (floats) of means
  
  Returns:
      Quantized input and compressed string
docstr_tok: ["Compress","`","inputs","`","tensor","to","string","Args",":","inputs",":","input","tensor","(","floats",")","to","compress","scales",":","tensor","(","floats",")","of","scales","means",":","tensor","(","floats",")","of","means","Returns",":","Quantized","input","and","compressed","string"]
code: def compress(
      self, inputs: Tensor, scales: Tensor, means: Tensor
  ) -> Tuple[Tensor, List[str]]:
      """
      Compress `inputs` tensor to string
  
      Args:
          inputs: input tensor (floats) to compress
          scales: tensor (floats) of scales
          means: tensor (floats) of means
  
      Returns:
          Quantized input and compressed string
      """
      indexes = self._get_indexes(means, scales)
      indexes = self._entropy_model._normalize_indexes(indexes)
      cdf_indexes = self._entropy_model.indexes_to_cdf_indexes(
          indexes_mean=indexes[..., 0], indexes_scale=indexes[..., 1]
      )  # Ints
  
      round_mean = torch.round(means)
      inputs = inputs - round_mean  # we are compressing this object
  
      bytestring = self._entropy_model.compress(
          inputs=inputs, indexes=cdf_indexes
      )
      quantized = torch.round(inputs)
      return quantized + round_mean, bytestring
  
imports: import math
  from typing import Any, List, Optional, Tuple
  import scipy.stats
  import torch
  import torch.nn
  from compressai.entropy_models import EntropyModel
  from compressai.ops import LowerBound
  from torch import Tensor
label_desc: Use image node_id 6 for calling the GsnConditionalLocScaleShift obj's underlying member method code with example usage: obj.compress(inputs, scales, means) and returns: unknown,  bytestring