in source/train.py [0:0]
def build_hooks(self):
"""
Extra hook to collect and plot evaluation metrics into TensorBoard.
"""
hooks = super().build_hooks()
hooks.insert(-1, LossEvalHook(
self.cfg.TEST.EVAL_PERIOD,
self.model,
build_detection_test_loader(
self.cfg,
self.cfg.DATASETS.TEST[0],
DatasetMapper(self.cfg,True)
)
))
return hooks