class_docstr: Main model class.
class_docstr_tok: ["Main","model","class","."]
code: def __init__(
      self,
      lmbda,
      num_filters,
      latent_depth,
      hyperprior_depth,
      num_slices,
      max_support_slices,
      num_scales,
      scale_min,
      scale_max,
  ):
      super().__init__()
      self.lmbda = lmbda
      self.num_scales = num_scales
      self.num_slices = num_slices
      self.max_support_slices = max_support_slices
      offset = tf.math.log(scale_min)
      factor = (tf.math.log(scale_max) - tf.math.log(scale_min)) / (
          num_scales - 1.0
      )
      self.scale_fn = lambda i: tf.math.exp(offset + factor * i)
      self.analysis_transform = AnalysisTransform(latent_depth)
      self.synthesis_transform = SynthesisTransform()
      self.hyper_analysis_transform = HyperAnalysisTransform(
          hyperprior_depth
      )
      self.hyper_synthesis_mean_transform = HyperSynthesisTransform()
      self.hyper_synthesis_scale_transform = HyperSynthesisTransform()
      self.cc_mean_transforms = [
          SliceTransform(latent_depth, num_slices)
          for _ in range(num_slices)
      ]
      self.cc_scale_transforms = [
          SliceTransform(latent_depth, num_slices)
          for _ in range(num_slices)
      ]
      self.lrp_transforms = [
          SliceTransform(latent_depth, num_slices)
          for _ in range(num_slices)
      ]
      self.hyperprior = tfc.NoisyDeepFactorized(
          batch_shape=[hyperprior_depth]
      )
      self.build((None, None, None, 3))
      # The call signature of decompress() depends on the number of slices, so we
      # need to compile the function dynamically.
      self.decompress = tf.function(
          input_signature=3
          * [tf.TensorSpec(shape=(2,), dtype=tf.int32)]
          + (num_slices + 1)
          * [tf.TensorSpec(shape=(1,), dtype=tf.string)]
      )(self.decompress)
  
imports: import argparse
  import functools
  import glob
  import sys
  from absl import app
  from absl.flags import argparse_flags
  import tensorflow
  import tensorflow_compression
  import tensorflow_datasets
label_desc: Use image node_id 1 to create a new MS2020Model object from inherited base classes: tf.keras with example: obj = MS2020Model(lmbda, num_filters, latent_depth, hyperprior_depth, num_slices, max_support_slices, num_scales, scale_min, scale_max)