class_docstr: Left-to-right Transformer language model.
class_docstr_tok: ["Left-to-right","Transformer","language","model","."]
docstr: Called at the end of validation to aggregate outputs.
  :param outputs: list of individual outputs of each validation step.
docstr_tok: ["Called","at","the","end","of","validation","to","aggregate","outputs",".",":","param","outputs",":","list","of","individual","outputs","of","each","validation","step","."]
code: def on_validation_epoch_end(self):
      """
      Called at the end of validation to aggregate outputs.
      :param outputs: list of individual outputs of each validation step.
      """
      self.eval_epoch_end(self.validation_step_outputs, "val")
      self.validation_step_outputs.clear()  # free memory
      self.eval_loss.reset()
      self.eval_ppl.reset()
  
imports: import json
  import math
  from typing import Dict, Optional
  import numpy
  import torch
  import torch.utils.data
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from nemo.collections.common.losses import SmoothedCrossEntropyLoss
  from nemo.collections.common.metrics import GlobalAverageLossMetric
  from nemo.collections.common.parts import transformer_weights_init
  from nemo.collections.nlp.data import SentenceDataset, TarredSentenceDataset
  from nemo.collections.nlp.metrics import SequencePerplexity
  from nemo.collections.nlp.modules.common import TokenClassifier
  from nemo.collections.nlp.modules.common.lm_utils import get_transformer
  from nemo.collections.nlp.modules.common.tokenizer_utils import get_tokenizer
  from nemo.core.classes.common import typecheck
  from nemo.core.classes.modelPT import ModelPT
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 8 for calling the TransformerLMModel obj's underlying member method code with example usage: obj.on_validation_epoch_end() without return types