code: def image_transformer2d_base():
      """Set of hyperparameters."""
      hparams = common_hparams.basic_params1()
      hparams.hidden_size = 512
      hparams.batch_size = 1
      hparams.max_length = 256
      hparams.dropout = 0.0
      hparams.clip_grad_norm = 0.0  # i.e. no gradient clipping
      hparams.optimizer_adam_epsilon = 1e-9
      hparams.learning_rate_decay_scheme = "noam"
      hparams.learning_rate = 0.1
      hparams.learning_rate_warmup_steps = 4000
      hparams.initializer_gain = 0.2
      hparams.initializer = "uniform_unit_scaling"
      hparams.weight_decay = 0.0
      hparams.optimizer_adam_beta1 = 0.9
      hparams.optimizer_adam_beta2 = 0.98
      hparams.label_smoothing = 0.0
      hparams.bottom["targets"] = modalities.make_targets_bottom(
          modalities.image_channel_embeddings_bottom
      )
      hparams.top["targets"] = modalities.identity_top
      hparams.norm_type = "layer"
      hparams.layer_prepostprocess_dropout = 0.0
      hparams.add_hparam("filter_size", 512)  # Add new ones like this.
  
      # attention-related flags
      hparams.add_hparam("num_heads", 8)
      hparams.add_hparam("attention_key_channels", 0)
      hparams.add_hparam("attention_value_channels", 0)
      hparams.add_hparam("ffn_layer", "conv_hidden_relu")
      # All hyperparameters ending in "dropout" are automatically set to 0.0
      # when not in training mode.
      hparams.add_hparam("attention_dropout", 0.0)
      hparams.add_hparam("relu_dropout", 0.0)
      hparams.add_hparam("pos", "timing")  # timing, none
      hparams.add_hparam("nbr_decoder_problems", 1)
      hparams.add_hparam("num_output_layers", 3)
      hparams.add_hparam("block_size", 1)
  
      # image size related flags
      # assuming that the image has same height and width
      hparams.add_hparam("img_len", 32)
      hparams.add_hparam("num_channels", 3)
      # Local attention params
      hparams.add_hparam("local_and_global_att", False)
      hparams.add_hparam("block_length", 256)
      hparams.add_hparam("block_width", 128)
      # Local 2D attention params
      hparams.add_hparam("query_shape", (16, 16))
      hparams.add_hparam("memory_flange", (16, 32))
      hparams.add_hparam("num_encoder_layers", 4)
      hparams.add_hparam("num_decoder_layers", 8)
      # attention type related params
      hparams.add_hparam("enc_attention_type", cia.AttentionType.GLOBAL)
      hparams.add_hparam(
          "dec_attention_type", cia.AttentionType.LOCAL_2D
      )
      hparams.add_hparam("block_raster_scan", False)
  
      # multipos attention params
      hparams.add_hparam("q_filter_width", 1)
      hparams.add_hparam("kv_filter_width", 1)
  
      hparams.add_hparam(
          "unconditional", False
      )  # unconditional generation
  
      # relative embedding hparams
      hparams.add_hparam("shared_rel", False)
      return hparams
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import numpy
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_image_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 for calling a global function with example usage: image_transformer2d_base() and returns: hparams