code: def get_hparams(config_name):
      """Set hyperparameters.
  
      Args:
        config_name: Name of config module to use.
  
      Returns:
        A HParams object (magenta) with defaults.
      """
      hparams = contrib_training.HParams(
          # Optimization
          batch_size=16,
          learning_rate=1e-4,
          adam_beta=0.5,
          max_steps=6000 * 50000,
          samples_per_second=16000,
          num_samples=64000,
          # Preprocessing
          n_fft=1024,
          hop_length=256,
          mask=True,
          log_mag=True,
          use_cqt=False,
          re_im=False,
          dphase=True,
          mag_only=False,
          pad=True,
          mu_law_num=0,
          raw_audio=False,
          # Graph
          num_latent=64,  # dimension of z.
          cost_phase_mask=False,
          phase_loss_coeff=1.0,
          fw_loss_coeff=1.0,  # Frequency weighted cost
          fw_loss_cutoff=1000,
      )
      # Set values from a dictionary in the config
      config = utils.get_module(
          "baseline.models.ae_configs.%s" % config_name
      )
      if hasattr(config, "config_hparams"):
          config_hparams = config.config_hparams
          hparams.update(config_hparams)
      return hparams
  
file_path: magenta/magenta/models/nsynth/baseline/models/ae.py
imports: from magenta.contrib import training
  from magenta.models.nsynth import utils
  import numpy
  import tensorflow.compat.v1
  import tf_slim
label_desc: Use image node_id 1 for calling a global function with example usage: get_hparams(config_name) and returns: hparams