code: def on_validation_epoch_end(self) -> None:
      # since the training step/validation step and test step are run on the IPU device
      # we must log the average loss outside the step functions.
      self.log(
          "val_acc", torch.stack(self.val_outptus).mean(), prog_bar=True
      )
      self.val_outptus.clear()
  
file_path: pytorch-lightning/examples/pytorch/ipu/mnist_sample.py
imports: import torch
  from lightning.pytorch import LightningModule, Trainer
  from lightning.pytorch.demos.mnist_datamodule import MNISTDataModule
  from torch.nn import functional
label_desc: Use image node_id 7 for calling the LitClassifier obj's underlying member method code with example usage: obj.on_validation_epoch_end() without return types