docstr: Computes average validation loss
docstr_tok: ["Computes","average","validation","loss"]
code: def on_validation_epoch_end(self):
      """
      Computes average validation loss
      """
      avg_loss = torch.stack(self.val_outputs).mean()
      self.log("val_loss", avg_loss, sync_dist=True)
      self.val_outputs.clear()
  
imports: import lightning
  import torch
  from torch.nn import functional
  from torch.utils.data import DataLoader, random_split
  from torchmetrics.functional import accuracy
  from torchvision import datasets, transforms
label_desc: Use image node_id 6 for calling the LightningMNISTClassifier obj's underlying member method code with example usage: obj.on_validation_epoch_end() without return types