code: def on_val_forward(self, runner):
      if runner.config["dummy"]:
          images = runner.get("images")
          target = runner.get("target")
      else:
          images, target = next(iter(runner.val_loader))
          if runner.config["ipex"]:
              images = images.contiguous(
                  memory_format=torch.channels_last
              )
          if runner.config["bf16"]:
              images = images.to(torch.bfloat16)
      runner.batch = images, target
      if runner.batch_idx < runner.config["warmup_iterations"]:
          output, target, loss = self.forward(
              runner, images, target, warmup=True
          )
      else:
          output, target, loss = self.forward(
              runner, images, target, warmup=False
          )
  
      runner.output = output
      runner.loss = loss
      runner.target = target
  
file_path: BigDL/python/orca/example/learn/pytorch/resnet50/inference.py
imports: import os
  import argparse
  import torch
  import torch.nn
  import torch.utils.data
  import torchvision.transforms
  import torchvision.datasets
  import torchvision.models
  from bigdl.dllib.utils.log4Error import *
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.learn.pytorch.callbacks import MainCallback
label_desc: Use image node_id 2 for calling the ResNetPerfCallback obj's underlying member method code with example usage: obj.on_val_forward(runner) without return types