class_docstr: Create an inference-only version of the model.
class_docstr_tok: ["Create","an","inference-only","version","of","the","model","."]
docstr: Parse the model operative config to infer new length parameters.
code: def configure_gin(self, ckpt):
      """Parse the model operative config to infer new length parameters."""
      parse_operative_config(ckpt)
  
      # Get preprocessor_type,
      ref = gin.query_parameter("Autoencoder.preprocessor")
      self.preprocessor_type = ref.config_key[-1].split(".")[-1]
  
      # Get hop_size, and sample_rate from gin config.
      self.sample_rate = gin.query_parameter("Harmonic.sample_rate")
      n_samples_train = gin.query_parameter("Harmonic.n_samples")
      time_steps_train = gin.query_parameter(
          f"{self.preprocessor_type}.time_steps"
      )
      self.hop_size = n_samples_train // time_steps_train
  
      # Get new lengths for inference.
      self.n_frames = int(
          self.length_seconds * self.sample_rate / self.hop_size
      )
      self.n_samples = self.n_frames * self.hop_size
      print("N_Samples:", self.n_samples)
      print("Hop Size:", self.hop_size)
      print("N_Frames:", self.n_frames)
  
      # Set gin config to new lengths from model properties.
      config = [
          f"Harmonic.n_samples = {self.n_samples}",
          f"FilteredNoise.n_samples = {self.n_samples}",
          f"{self.preprocessor_type}.time_steps = {self.n_frames}",
          "oscillator_bank.use_angular_cumsum = True",
      ]
      if self.remove_reverb:
          # Remove reverb processor.
          processor_group_string = """ProcessorGroup.dag = [
        (@synths.Harmonic(),
          ['amps', 'harmonic_distribution', 'f0_hz']),
        (@synths.FilteredNoise(),
          ['noise_magnitudes']),
        (@processors.Add(),
          ['filtered_noise/signal', 'harmonic/signal']),
        ]"""
          config.append(processor_group_string)
  
      with gin.unlock_config():
          gin.parse_config(config)
  
imports: import ddsp
  from ddsp.training import models
  from ddsp.training import train_util
  import gin
  import tensorflow
label_desc: Use image node_id 2 for calling the AutoencoderInference obj's underlying member method code with example usage: obj.configure_gin(ckpt) without return types