def offline_evaluate(pred_func, output_file): df = get_eval_dataflow() if config.DYNAMIC_SHAPE_PRED: eval_brats( df, lambda img: segment_one_image_dynamic(img, pred_func)) else: eval_brats( df, lambda img: segment_one_image(img, pred_func))
def _eval(self): scores = eval_brats( self.df, lambda img: segment_one_image(img, [self.pred], is_online=True)) for k, v in scores.items(): self.trainer.monitors.put_scalar(k, v)