class_docstr: Base class for detectors.
docstr: The iteration step during validation.
  
  This method shares the same signature as :func:`train_step`, but used
  during val epochs. Note that the evaluation after training epochs is
  not implemented with this method, but an evaluation hook.
docstr_tok: ["The","iteration","step","during","validation",".","This","method","shares","the","same","signature","as",":","func",":","`","train_step","`",",","but","used","during","val","epochs",".","Note","that","the","evaluation","after","training","epochs","is","not","implemented","with","this","method",",","but","an","evaluation","hook","."]
code: def val_step(self, data, optimizer):
      """The iteration step during validation.
  
      This method shares the same signature as :func:`train_step`, but used
      during val epochs. Note that the evaluation after training epochs is
      not implemented with this method, but an evaluation hook.
      """
      losses = self(**data)
      loss, log_vars = self._parse_losses(losses)
  
      outputs = dict(
          loss=loss,
          log_vars=log_vars,
          num_samples=len(data["img_metas"]),
      )
  
      return outputs
  
imports: from abc import ABCMeta, abstractmethod
  from collections import OrderedDict
  import mmcv
  import numpy
  import torch
  import torch.distributed
  import torch.nn
  from mmcv.runner import auto_fp16
  from mmcv.utils import print_log
  from mmdet.utils import get_root_logger
label_desc: Use image node_id 16 for calling the BaseDetector obj's underlying member method code with example usage: obj.val_step(data, optimizer) and returns: outputs