code: def train_batch(self, batch_info, data, target):
          
          batch_info.optimizer.zero_grad()
          loss = self.feed_batch(batch_info, data, target)
          loss.backward()
  
          if self.max_grad_norm is not None:
              batch_info['grad_norm'] = torch.nn.utils.clip_grad_norm_(
                  filter(lambda p: p.requires_grad, self.model.parameters()),
                  max_norm=self.max_grad_norm
              )
  
          batch_info.optimizer.step()
docs: Train single batch of data