code: def add_advance_args(parser):
      group = parser.add_argument_group("Advanced Training")
      # AMP
      group.add_argument(
          "--amp",
          action="store_true",
          help="Enable automatic mixed precision training (AMP).",
      )
      group.add_argument(
          "--scale-loss",
          type=float,
          default=1.0,
          help="The loss scalar for AMP training, only be applied when --amp is set.",
      )
      group.add_argument(
          "--use-dynamic-loss-scaling",
          action="store_true",
          help="Enable dynamic loss scaling in AMP training, only be applied when --amp is set.",
      )
      group.add_argument(
          "--use-pure-fp16",
          action="store_true",
          help="Enable pure FP16 training, only be applied when --amp is set.",
      )
      group.add_argument(
          "--fuse-resunit",
          action="store_true",
          help="Enable CUDNNv8 ResUnit fusion, only be applied when --amp is set.",
      )
      # ASP
      group.add_argument(
          "--asp",
          action="store_true",
          help="Enable automatic sparse training (ASP).",
      )
      group.add_argument(
          "--prune-model",
          action="store_true",
          help="Prune model to 2:4 sparse pattern, only be applied when --asp is set.",
      )
      group.add_argument(
          "--mask-algo",
          default="mask_1d",
          choices=("mask_1d", "mask_2d_greedy", "mask_2d_best"),
          help="The algorithm to generate sparse masks. It should be one of "
          "{mask_1d, mask_2d_greedy, mask_2d_best}. This only be applied "
          "when --asp and --prune-model is set.",
      )
      return parser
  
file_path: DALI/docs/examples/use_cases/paddle/resnet50/utils/config.py
imports: import os
  import copy
  import argparse
  import logging
  import distutils.util
  import dllogger
  from utils.mode import RunScope
  from utils.utility import get_num_trainers
  from utils.save_load import _PDOPT_SUFFIX, _PDPARAMS_SUFFIX
label_desc: Use image node_id 6 for calling a global function with example usage: add_advance_args(parser) and returns: parser