code: def validation(args):
      checkpoint = Checkpoint(
          rank=0,
          world_size=1,
          embedding_size=args.embedding_size,
          num_classes=None,
          checkpoint_dir=args.checkpoint_dir,
      )
  
      test_program = paddle.static.Program()
      startup_program = paddle.static.Program()
  
      test_model = StaticModel(
          main_program=test_program,
          startup_program=startup_program,
          backbone_class_name=args.backbone,
          embedding_size=args.embedding_size,
          mode="test",
      )
  
      gpu_id = int(os.getenv("FLAGS_selected_gpus", 0))
      place = paddle.CUDAPlace(gpu_id)
      exe = paddle.static.Executor(place)
      exe.run(startup_program)
  
      checkpoint.load(
          program=test_program, for_train=False, dtype="float32"
      )
  
      callback_verification = CallBackVerification(
          1,
          0,
          args.batch_size,
          test_program,
          list(test_model.backbone.input_dict.values()),
          list(test_model.backbone.output_dict.values()),
          args.val_targets,
          args.data_dir,
      )
  
      callback_verification(1)
  
file_path: insightface/recognition/arcface_paddle/static/validation.py
imports: import errno
  import os
  import numpy
  import paddle
  from .utils.verification import CallBackVerification
  from .utils.io import Checkpoint
  from .static_model import StaticModel
  from .None import backbones
label_desc: Use image node_id 1 for calling a global function with example usage: validation(args) without return types