Fixed index out of range in case of resume

pull/2077/head
lorenzbaraldi 2024-01-11 14:47:56 +01:00 committed by Ross Wightman
parent 36449617ff
commit 8c663c4b86
1 changed files with 1 additions and 1 deletions

View File

@ -912,7 +912,7 @@ def main():
results = {'all': results}
if best_metric is not None:
results['best'] = results['all'][best_epoch]
results['best'] = results['all'][best_epoch - start_epoch]
_logger.info('*** Best metric: {0} (epoch {1})'.format(best_metric, best_epoch))
print(f'--result\n{json.dumps(results, indent=4)}')