class_docstr: Base class for all Gaussian Process estimators.
  
  Most notably, a GPyTorch compatible criterion and likelihood should be
  provided.
class_docstr_tok: ["Base","class","for","all","Gaussian","Process","estimators",".","Most","notably",",","a","GPyTorch","compatible","criterion","and","likelihood","should","be","provided","."]
docstr: Compute y_pred, loss value, and update net's gradients.
  
  The module is set to be in train mode (e.g. dropout is
  applied).
  
  Parameters
  ----------
  batch
    A single batch returned by the data loader.
  
  **fit_params : dict
    Additional parameters passed to the ``forward`` method of
    the module and to the ``self.train_split`` call.
  
  Returns
  -------
  step : dict
    A dictionary ``{'loss': loss, 'y_pred': y_pred}``, where the
    float ``loss`` is the result of the loss function and
    ``y_pred`` the prediction generated by the PyTorch module.
docstr_tok: ["Compute","y_pred",",","loss","value",",","and","update","net","'s","gradients",".","The","module","is","set","to","be","in","train","mode","(","e.g",".","dropout","is","applied",")",".","Parameters","--","--","--","--","--","batch","A","single","batch","returned","by","the","data","loader",".","*","*","fit_params",":","dict","Additional","parameters","passed","to","the","``","forward","``","method","of","the","module","and","to","the","``","self.train_split","``","call",".","Returns","--","--","--","-","step",":","dict","A","dictionary","``","{","'loss","'",":","loss",",","'y_pred","'",":","y_pred","}","``",",","where","the","float","``","loss","``","is","the","result","of","the","loss","function","and","``","y_pred","``","the","prediction","generated","by","the","PyTorch","module","."]
code: def train_step_single(self, batch, **fit_params):
      """Compute y_pred, loss value, and update net's gradients.
  
      The module is set to be in train mode (e.g. dropout is
      applied).
  
      Parameters
      ----------
      batch
        A single batch returned by the data loader.
  
      **fit_params : dict
        Additional parameters passed to the ``forward`` method of
        the module and to the ``self.train_split`` call.
  
      Returns
      -------
      step : dict
        A dictionary ``{'loss': loss, 'y_pred': y_pred}``, where the
        float ``loss`` is the result of the loss function and
        ``y_pred`` the prediction generated by the PyTorch module.
  
      """
      step = super().train_step_single(batch, **fit_params)
      # To obtain the posterior, the likelihood must be applied on the output
      # of the module. This cannot be performed inside the module, because the
      # GPyTorch criteria apply the likelihood on the module output
      # themselves.
      step["y_pred"] = self.likelihood_(step["y_pred"])
      return step
  
imports: import pickle
  import re
  import gpytorch
  import numpy
  import torch
  from skorch.net import NeuralNet
  from skorch.dataset import ValidSplit
  from skorch.dataset import unpack_data
  from skorch.callbacks import EpochScoring
  from skorch.callbacks import EpochTimer
  from skorch.callbacks import PassthroughScoring
  from skorch.callbacks import PrintLog
  from skorch.utils import check_is_fitted
  from skorch.utils import get_dim
  from skorch.utils import is_dataset
  from skorch.utils import to_numpy
  from skorch.utils import to_tensor
label_desc: Use image node_id 5 for calling the GPBase obj's underlying member method code with example usage: obj.train_step_single(batch) and returns: step