code: def get_loss(self, y_pred, y_true, X=None, training=False):
          
          y_true = to_tensor(y_true, device=self.device)
          return self.criterion_(y_pred, y_true)
docs: Return the loss for this batch.
  
          Parameters
          ----------
          y_pred : torch tensor
            Predicted target values
  
          y_true : torch tensor
            True target values.
  
          X : input data, compatible with skorch.dataset.Dataset
            By default, you should be able to pass:
  
              * numpy arrays
              * torch tensors
              * pandas DataFrame or Series
              * scipy sparse CSR matrices
              * a dictionary of the former three
              * a list/tuple of the former three
              * a Dataset
  
            If this doesn't work with your data, you have to pass a
            ``Dataset`` that can deal with the data.
  
          training : bool (default=False)
            Whether train mode should be used or not.