class_docstr: This is a configurable module that you can extend for experiments that involve a 
  training and validation datasets (i.e. most DL experiments).
  This is based on :class:`labml_helpers.training_loop.TrainingLoopConfigs`.
  
  Arguments:
      epochs (int): Number of epochs to train on. Defaults to ``10``.
      train_loader (torch.utils.data.DataLoader): Training data loader.
      valid_loader (torch.utils.data.DataLoader): Training data loader.
      inner_iterations (int): Number of times to switch between training and validation
       within an epoch. Defaults to ``1``.
  
  You can override ``init``, ``step`` functions. There is also a ``sample`` function
  that you can override to generate samples ever time it switches between training and validation.
  
  `Here's an example usage <https://github.com/labmlai/labml/blob/master/samples/pytorch/mnist/e_labml_helpers.py>`_.    
class_docstr_tok: ["This","is","a","configurable","module","that","you","can","extend","for","experiments","that","involve","a","training","and","validation","datasets","(","i.e",".","most","DL","experiments",")",".","This","is","based","on",":","class",":","`","labml_helpers.training_loop.TrainingLoopConfigs","`",".","Arguments",":","epochs","(","int",")",":","Number","of","epochs","to","train","on",".","Defaults","to","``","10","``",".","train_loader","(","torch.utils.data.DataLoader",")",":","Training","data","loader",".","valid_loader","(","torch.utils.data.DataLoader",")",":","Training","data","loader",".","inner_iterations","(","int",")",":","Number","of","times","to","switch","between","training","and","validation","within","an","epoch",".","Defaults","to","``","1","``",".","You","can","override","``","init","``",",","``","step","``","functions",".","There","is","also","a","``","sample","``","function","that","you","can","override","to","generate","samples","ever","time","it","switches","between","training","and","validation",".","`","Here","'s","an","example","usage","<","https",":","\/\/github.com\/labmlai\/labml\/blob\/master\/samples\/pytorch\/mnist\/e_labml_helpers.py",">","`","_","."]
code: def sample(self):
      pass
  
imports: from typing import Optional, Dict, List, Callable, Any
  import torch.optim
  import torch.optim
  import torch.utils.data
  import torch.utils.data
  from torch import nn
  import labml.utils.pytorch
  from labml import tracker, monit
  from labml.configs import option, meta_config
  from .device import DeviceConfigs
  from .metrics import StateModule
  from .training_loop import TrainingLoopConfigs
label_desc: Use image node_id 5 for calling the TrainValidConfigs obj's underlying member method code with example usage: obj.sample() without return types