mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Fixed index out of range in case of resume
This commit is contained in:
parent
36449617ff
commit
8c663c4b86
2
train.py
2
train.py
@ -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)}')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user