class_docstr: <a id="NLPClassificationConfigs"></a>
  
  ## Trainer configurations
  
  This has the basic configurations for NLP classification task training.
  All the properties are configurable.
class_docstr_tok: ["<","a","id=","''","NLPClassificationConfigs","''",">","<","\/a",">","#","#","Trainer","configurations","This","has","the","basic","configurations","for","NLP","classification","task","training",".","All","the","properties","are","configurable","."]
docstr: ### Initialization
docstr_tok: ["#","#","#","Initialization"]
code: def init(self):
      """
      ### Initialization
      """
      # Set tracker configurations
      tracker.set_scalar("accuracy.*", True)
      tracker.set_scalar("loss.*", 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]
  
imports: from collections import Counter
  from typing import Callable
  import torch
  import torchtext
  from torch import nn
  from torch.utils.data import DataLoader
  import torchtext.vocab
  from torchtext.vocab import Vocab
  from labml import lab, tracker, monit
  from labml.configs import option
  from labml_helpers.device import DeviceConfigs
  from labml_helpers.metrics.accuracy import Accuracy
  from labml_helpers.module import Module
  from labml_helpers.train_valid import TrainValidConfigs, hook_model_outputs, BatchIndex
  from labml_nn.optimizers.configs import OptimizerConfigs
label_desc: Use image node_id 1 for calling the NLPClassificationConfigs obj's underlying member method code with example usage: obj.init() without return types