class_docstr: Gaussian Conditional prior with mean and scale indexes
docstr: Build the quantized CDF table, which will contain num_means*num_scales PMFs
docstr_tok: ["Build","the","quantized","CDF","table",",","which","will","contain","num_means","*","num_scales","PMFs"]
code: def _build_tables(self) -> None:
      """
      Build the quantized CDF table, which will contain num_means*num_scales PMFs
      """
      device = self._indexes_table.device
      sps_norm = sps.norm(
          self._prior_mean.numpy(), self._prior_scale.numpy()
      )
      tail_lower = torch.tensor(
          sps_norm.ppf(self.tail_mass / 2), device=device
      )
      tail_upper = torch.tensor(
          sps_norm.ppf(1.0 - self.tail_mass / 2), device=device
      )
  
      minimas = torch.floor(tail_lower).to(
          torch.int32
      )  # [num_means, num_scales]
      maximas = torch.ceil(tail_upper).to(
          torch.int32
      )  # [num_means, num_scales]
      pmf_start = minimas.to(
          self._prior_dtype
      )  # [num_means, num_scales]
      pmf_length = maximas - minimas + 1  # [num_means, num_scales]
      max_length = int(torch.max(pmf_length).item())
  
      samples = torch.arange(0, max_length).to(
          self._prior_dtype
      )  # [max_len]
      samples = (
          samples.unsqueeze(-1).unsqueeze(-1).to(device)
      )  # [max_len, 1, 1]
      samples = samples + pmf_start.unsqueeze(
          0
      )  # [max_len, num_means, num_scales]
  
      num_means, num_scales = self._index_ranges
      num_pmfs = num_means * num_scales
      pmf_length = pmf_length.reshape(
          num_pmfs
      )  # sum(pmf_length) -> relates to CDFs
      cdf_offset = minimas.reshape(num_pmfs)
  
      upper = self._standardized_cumulative(
          (0.5 - (samples - self._prior_mean.numpy()).abs())
          / self._prior_scale.numpy()
      )  # [max_len, num_means, num_scales]
      lower = self._standardized_cumulative(
          (-0.5 - (samples - self._prior_mean.numpy()).abs())
          / self._prior_scale.numpy()
      )  # [max_len, num_means, num_scales]
      pmf = upper - lower  #
      pmf = pmf.reshape(
          max_length, num_pmfs
      ).T  # [num_pmfs, max_length]
  
      tail_mass = 2 * lower.reshape(max_length, num_pmfs).T[:, :1]
  
      quantized_cdf = torch.Tensor(
          num_pmfs, max_length + 2, device=device
      )
      quantized_cdf = self._pmf_to_cdf(
          pmf, tail_mass, pmf_length, max_length
      )
      # (quantized_cdf!=0).float().sum() == (sum(pmf_length) + len(tail_mass))
  
      self._quantized_cdf = quantized_cdf
      self._offset = cdf_offset  # -pmf_center
      self._cdf_length = pmf_length + 2
  
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 7 for calling the ContinuousIndexedGaussianConditional obj's underlying member method code with example usage: obj._build_tables() without return types