class_docstr: <a id="MNISTConfigs"></a>
  
  ## Trainer configurations
class_docstr_tok: ["<","a","id=","''","MNISTConfigs","''",">","<","\/a",">","#","#","Trainer","configurations"]
docstr: ### Initialization
docstr_tok: ["#","#","#","Initialization"]
code: def init(self):
      """
      ### Initialization
      """
      # Set tracker configurations
      tracker.set_scalar("loss.*", True)
      tracker.set_scalar("accuracy.*", True)
      # Add a hook to log module outputs
      hook_model_outputs(self.mode, self.model, "model")
      # Add accuracy as a state module.
      # The name is probably confusing, since it's meant to store
      # states between training and validation for RNNs.
      # This will keep the accuracy metric stats separate for training and validation.
      self.state_modules = [self.accuracy]
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/experiments/mnist.py
imports: import torch.nn
  import torch.utils.data
  from labml_helpers.module import Module
  from labml import tracker
  from labml.configs import option
  from labml_helpers.datasets.mnist import MNISTConfigs
  from labml_helpers.device import DeviceConfigs
  from labml_helpers.metrics.accuracy import Accuracy
  from labml_helpers.train_valid import TrainValidConfigs, BatchIndex, hook_model_outputs
  from labml_nn.optimizers.configs import OptimizerConfigs
label_desc: Use image node_id 1 for calling the MNISTConfigs obj's underlying member method code with example usage: obj.init() without return types