class_docstr: ``TrainBatchLoop`` 针对一个 dataloader 的数据完成一个 epoch 的训练迭代过程；
  
  :param batch_step_fn: 您可以传入该参数来替换默认的 ``bath_step_fn``；
docstr: 针对一个 ``batch`` 的数据的训练过程；
  
  :param trainer: :class:`~fastNLP.core.controllers.Trainer` 实例；
  :param batch: 一个 ``batch`` 的数据；
docstr_tok: ["\u9488\u5bf9\u4e00\u4e2a","``","batch","``","\u7684\u6570\u636e\u7684\u8bad\u7ec3\u8fc7\u7a0b\uff1b",":","param","trainer",":",":","class",":","`","~fastNLP.core.controllers.Trainer","`","\u5b9e\u4f8b\uff1b",":","param","batch",":","\u4e00\u4e2a","``","batch","``","\u7684\u6570\u636e\uff1b"]
code: def batch_step_fn(trainer, batch):
      r"""
      针对一个 ``batch`` 的数据的训练过程；
  
      :param trainer: :class:`~fastNLP.core.controllers.Trainer` 实例；
      :param batch: 一个 ``batch`` 的数据；
      """
      outputs = trainer.train_step(batch)
      trainer.backward(outputs)
      trainer.step()
      trainer.zero_grad()
  
file_path: fastNLP/fastNLP/core/controllers/loops/train_batch_loop.py
imports: from typing import Optional, Callable
  from .loop import Loop
  from fastNLP.core.log import logger
  from fastNLP.core.utils import match_and_substitute_params
  from fastNLP.core.utils.exceptions import EarlyStopException
label_desc: Use image node_id 3 for calling the TrainBatchLoop obj's underlying member method code with example usage: obj.batch_step_fn(trainer, batch) without return types