code: def gen_config():
      base_config = {
          "Global": {
              "algorithm": "SRNet",
              "use_gpu": True,
              "start_epoch": 1,
              "stage1_epoch_num": 100,
              "stage2_epoch_num": 100,
              "log_smooth_window": 20,
              "print_batch_step": 2,
              "save_model_dir": "./output/SRNet",
              "use_visualdl": False,
              "save_epoch_step": 10,
              "vgg_pretrain": "./pretrained/VGG19_pretrained",
              "vgg_load_static_pretrain": True,
          },
          "Architecture": {
              "model_type": "data_aug",
              "algorithm": "SRNet",
              "net_g": {
                  "name": "srnet_net_g",
                  "encode_dim": 64,
                  "norm": "batch",
                  "use_dropout": False,
                  "init_type": "xavier",
                  "init_gain": 0.02,
                  "use_dilation": 1,
              },
              # input_nc, ndf, netD,
              # n_layers_D=3, norm='instance', use_sigmoid=False, init_type='normal', init_gain=0.02, gpu_id='cuda:0'
              "bg_discriminator": {
                  "name": "srnet_bg_discriminator",
                  "input_nc": 6,
                  "ndf": 64,
                  "netD": "basic",
                  "norm": "none",
                  "init_type": "xavier",
              },
              "fusion_discriminator": {
                  "name": "srnet_fusion_discriminator",
                  "input_nc": 6,
                  "ndf": 64,
                  "netD": "basic",
                  "norm": "none",
                  "init_type": "xavier",
              },
          },
          "Loss": {
              "lamb": 10,
              "perceptual_lamb": 1,
              "muvar_lamb": 50,
              "style_lamb": 500,
          },
          "Optimizer": {
              "name": "Adam",
              "learning_rate": {
                  "name": "lambda",
                  "lr": 0.0002,
                  "lr_decay_iters": 50,
              },
              "beta1": 0.5,
              "beta2": 0.999,
          },
          "Train": {
              "batch_size_per_card": 8,
              "num_workers_per_card": 4,
              "dataset": {
                  "delimiter": "\t",
                  "data_dir": "/",
                  "label_file": "tmp/label.txt",
                  "transforms": [
                      {
                          "DecodeImage": {
                              "to_rgb": True,
                              "to_np": False,
                              "channel_first": False,
                          }
                      },
                      {
                          "NormalizeImage": {
                              "scale": 1.0 / 255.0,
                              "mean": [0.485, 0.456, 0.406],
                              "std": [0.229, 0.224, 0.225],
                              "order": None,
                          }
                      },
                      {"ToCHWImage": None},
                  ],
              },
          },
      }
      with open("config.yml", "w") as f:
          yaml.dump(base_config, f)
  
file_path: PaddleOCR/StyleText/utils/config.py
imports: import yaml
  import os
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
label_desc: Use image node_id 4 for calling a global function with example usage: gen_config() without return types