code: def validation_step(self, Xi, yi, **fit_params):
          
          self.module_.eval()
          with torch.no_grad():
              y_pred = self.infer(Xi, **fit_params)
              loss = self.get_loss(y_pred, yi, X=Xi, training=False)
          return {
              'loss': loss,
              'y_pred': y_pred,
              }
docs: Perform a forward step using batched data and return the
          resulting loss.
  
          The module is set to be in evaluation mode (e.g. dropout is
          not applied).
  
          Parameters
          ----------
          Xi : input data
            A batch of the input data.
  
          yi : target data
            A batch of the target data.
  
          **fit_params : dict
            Additional parameters passed to the ``forward`` method of
            the module and to the ``self.train_split`` call.