class_docstr: MainCallback is a one-of-a-kind callback that contains hook functions:
      - `on_iter_forward`
      - `on_iter_backward`
      - `on_lr_adjust`
  
  These methods are somewhat special, because only one special MainCallback
  should be allowed to implement these methods among all callbacks, otherwise
  there will propagate forward and backward twice.
docstr: If `on_train_forward` and `on_val_forward` are not overridden,
  this will be called during forward when training and validating.
  Any behavior inconsistent with the default forward behavior should be overridden here.
code: def on_iter_forward(self, runner):
      """
      If `on_train_forward` and `on_val_forward` are not overridden,
      this will be called during forward when training and validating.
      Any behavior inconsistent with the default forward behavior should be overridden here.
      """
      # unpack features into features and targets
      *features, target = runner.batch
      # Forward features
      runner.output = runner.model(*features)
      # Ensure `targetL` and `outputL` are always in a list format.
      targetL = (
          [target] if not isinstance(target, (list, tuple)) else target
      )
      outputL = (
          [runner.output]
          if not isinstance(runner.output, (list, tuple))
          else runner.output
      )
      # Compute loss
      runner.loss = runner.criterion(*outputL, *targetL)
      runner.target = target
  
file_path: BigDL/python/orca/src/bigdl/orca/learn/pytorch/callbacks/maincallback.py
imports: from .base import Callback
  import torch
  from bigdl.dllib.utils.log4Error import invalidInputError
label_desc: Use image node_id 1 for calling the MainCallback obj's underlying member method code with example usage: obj.on_iter_forward(runner) without return types