mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
fix: the exception not using default topk argument
This commit is contained in:
parent
715519a5ef
commit
ffa90e04d3
@ -119,8 +119,8 @@ def main():
|
|||||||
with open(os.path.join(args.output_dir, './topk_ids.csv'), 'w') as out_file:
|
with open(os.path.join(args.output_dir, './topk_ids.csv'), 'w') as out_file:
|
||||||
filenames = loader.dataset.filenames(basename=True)
|
filenames = loader.dataset.filenames(basename=True)
|
||||||
for filename, label in zip(filenames, topk_ids):
|
for filename, label in zip(filenames, topk_ids):
|
||||||
out_file.write('{0},{1},{2},{3},{4},{5}\n'.format(
|
out_file.write('{0},{1}\n'.format(
|
||||||
filename, label[0], label[1], label[2], label[3], label[4]))
|
filename, ','.join([ str(v) for v in label])))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user