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: Called during prediction.
  Any behavior inconsistent with the default prediction behavior should be overridden here.
code: def on_pred_forward(self, runner):
      """
      Called during prediction.
      Any behavior inconsistent with the default prediction behavior should be overridden here.
      """
      output = runner.model(*runner.batch)
  
      if len(output.size()) > 1:
          # In case there is extra trailing dimensions.
          for i in reversed(range(1, len(output.size()))):
              output = torch.squeeze(output, i)
  
      # todo support multi-output model
      runner.output = output.detach().numpy()
  
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 6 for calling the MainCallback obj's underlying member method code with example usage: obj.on_pred_forward(runner) without return types