code: def iaf_hparams(hidden_size=512, filter_size=4096):
      """Create hyperpameters for inverse autoregressive flows.
  
      Args:
        hidden_size: Width of attention layers and neural network output layer.
        filter_size: Hidden layer width for neural network.
  
      Returns:
        hparams: Hyperpameters with basic presets for inverse autoregressive flows.
      """
      hparams = common_hparams.basic_params1()
  
      # Attention hyperparameters.
      hparams.hidden_size = hidden_size
      hparams.add_hparam("attention_key_channels", None)
      hparams.add_hparam("attention_value_channels", None)
      hparams.add_hparam("num_heads", 4)
      hparams.add_hparam("attention_dropout", 0.1)
      hparams.add_hparam("shared_rel", False)
      hparams.add_hparam("block_width", 1)
      hparams.add_hparam("block_length", 1)
      hparams.add_hparam("q_filter_width", 1)
      hparams.add_hparam("kv_filter_width", 1)
  
      # Preprocessing and postprocesing hyperparameters.
      hparams.layer_preprocess_sequence = "n"
      hparams.layer_prepostprocess_dropout = 0.1
      hparams.norm_type = "layer"
      hparams.norm_epsilon = 1e-06
      hparams.layer_prepostprocess_dropout_broadcast_dims = ""
      hparams.layer_postprocess_sequence = "da"
  
      # Feedforward neural network hyperparameters.
      hparams.add_hparam("filter_size", filter_size)
      hparams.add_hparam("ffn_layer", "conv_hidden_relu")
      hparams.add_hparam("relu_dropout", 0.1)
      return hparams
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from functools import partial
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_image_attention
  from tensor2tensor.layers import common_layers
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tensorflow_probability
  from tensorflow.python.training import moving_averages
label_desc: Use image node_id 29 for calling a global function with example usage: iaf_hparams(hidden_size, filter_size) and returns: hparams