def METHOD_NAME(self, data_loader: DataLoader) -> Dict[str, torch.Tensor]:
    validation_loss = 0.0
    if self.model_cls.lower() != "transformer":
        self.hidden = self.model.init_hidden(self.eval_batch_size)
    for batch in data_loader:
        batch = self.context.to_device(batch)
        if self.model_cls.lower() == "transformer":
            output = self.model(batch[:-1])
            output = output.view(-1, self.corpus.ntokens)
        else:
            output, self.hidden = self.model(batch[:-1], self.hidden)
            self.hidden = self.model.repackage_hidden(self.hidden)
        validation_loss += len(batch[:-1]) * self.criterion(output, batch[1:].view(-1)).item()
    validation_loss /= len(data_loader.dataset) - 1
    self.lr_scheduler.step(validation_loss)
    if self.model_cls.lower() != "transformer":
        self.hidden = self.model.init_hidden(self.context.get_per_slot_batch_size())
    return {"validation_loss": validation_loss}