code: def create_optimizer(args, model_params):
      if args.optim == "sgd":
          return optim.SGD(
              model_params,
              args.lr,
              momentum=args.momentum,
              weight_decay=args.weight_decay,
          )
      elif args.optim == "adagrad":
          return optim.Adagrad(
              model_params, args.lr, weight_decay=args.weight_decay
          )
      elif args.optim == "adam":
          return optim.Adam(
              model_params,
              args.lr,
              betas=(args.beta1, args.beta2),
              weight_decay=args.weight_decay,
          )
      elif args.optim == "amsgrad":
          return optim.Adam(
              model_params,
              args.lr,
              betas=(args.beta1, args.beta2),
              weight_decay=args.weight_decay,
              amsgrad=True,
          )
      elif args.optim == "adabound":
          return AdaBound(
              model_params,
              args.lr,
              betas=(args.beta1, args.beta2),
              final_lr=args.final_lr,
              gamma=args.gamma,
              weight_decay=args.weight_decay,
          )
      else:
          assert args.optim == "amsbound"
          return AdaBound(
              model_params,
              args.lr,
              betas=(args.beta1, args.beta2),
              final_lr=args.final_lr,
              gamma=args.gamma,
              weight_decay=args.weight_decay,
              amsbound=True,
          )
  
file_path: AdaBound/demos/cifar10/main.py
imports: from __future__ import print_function
  import torch.optim
  import torch.backends.cudnn
  import torchvision
  import torchvision.transforms
  import os
  import argparse
  from models import *
  from adabound import AdaBound
label_desc: Use image node_id 6 for calling a global function with example usage: create_optimizer(args, model_params) and returns: optim, optim, optim, optim, AdaBound, AdaBound