class_docstr: Class with Conditional Random Field from PyTorch-CRF library
  with modified training function
code: def __init__(self, num_tags: int, batch_first: bool = False) -> None:
      super().__init__(num_tags=num_tags, batch_first=batch_first)
      nn.init.zeros_(self.transitions)
      nn.init.zeros_(self.start_transitions)
      nn.init.zeros_(self.end_transitions)
      self.stats = torch.zeros((num_tags, num_tags), dtype=torch.float)
      self.zeros = torch.zeros((num_tags, num_tags), dtype=torch.float)
      self.neg = torch.full((num_tags, num_tags), -1000.0)
  
imports: import numpy
  import torch
  from torch import nn
  from torchcrf import CRF
label_desc: Use image node_id 1 to create a new CRF object from inherited base classes: CRFbase with example: obj = CRF(num_tags, batch_first)