class_docstr: Train/eval directpose
class_docstr_tok: ["Train\/eval","directpose"]
code: def __init__(
      self,
      base_iter,
      max_iter,
      model,
      dataloader,
      optimizer,
      scheduler,
      cfg,
      writer=None,
  ):
      logger.info("Configuration:\n" + str(cfg))
      self.base_iter = base_iter
      self.max_iter = max_iter
      self.model = model
      self.dataloader = iter(dataloader)
      self.optimizer = optimizer
      self.scheduler = scheduler
      self.cfg = cfg
      self.writer = writer
      self.iter_timer = AverageMeter()
      val_datasets = cfg.CONFIG.DATA.DATASET.VAL
      self.evaluators = [
          COCOEvaluator(
              val_dataset,
              cfg,
              distributed=cfg.DDP_CONFIG.DISTRIBUTED,
              output_dir=cfg.CONFIG.LOG.EVAL_DIR,
          )
          for val_dataset in val_datasets
      ]
  
file_path: gluon-cv/gluoncv/torch/utils/task_utils/pose.py
imports: import time
  import logging
  import datetime
  import numpy
  import torch
  from ..None import comm
  from ..utils import AverageMeter
  from ..model_utils import save_model
  from ..optimizer import maybe_add_gradient_clipping
  from ..eval_utils.coco_eval import COCOEvaluator
label_desc: Use image node_id 1 to create a new DirectposePipeline object  with example: obj = DirectposePipeline(base_iter, max_iter, model, dataloader, optimizer, scheduler, cfg, writer)