return if the results is the best.
(self, new_res, epoch, is_ema=False)
| 528 | self.best_regular = BestMetricSingle(init_res, better) |
| 529 | |
| 530 | def update(self, new_res, epoch, is_ema=False): |
| 531 | """return if the results is the best.""" |
| 532 | if not self.use_ema: |
| 533 | return self.best_all.update(new_res, epoch) |
| 534 | else: |
| 535 | if is_ema: |
| 536 | self.best_ema.update(new_res, epoch) |
| 537 | return self.best_all.update(new_res, epoch) |
| 538 | else: |
| 539 | self.best_regular.update(new_res, epoch) |
| 540 | return self.best_all.update(new_res, epoch) |
| 541 | |
| 542 | def summary(self): |
| 543 | if not self.use_ema: |