mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Batch validate a list of files if model is a text file with model per line
This commit is contained in:
parent
f8a63a3b71
commit
5d6983c462
@ -296,6 +296,11 @@ def main():
|
||||
model_names = list_models(args.model)
|
||||
model_cfgs = [(n, '') for n in model_names]
|
||||
|
||||
if not model_cfgs and os.path.isfile(args.model):
|
||||
with open(args.model) as f:
|
||||
model_names = [line.rstrip() for line in f]
|
||||
model_cfgs = [(n, None) for n in model_names if n]
|
||||
|
||||
if len(model_cfgs):
|
||||
results_file = args.results_file or './results-all.csv'
|
||||
_logger.info('Running bulk validation on these pretrained models: {}'.format(', '.join(model_names)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user