Compare commits
No commits in common. "aead4df707ee0bfb5d5c95c0d945e1d97ef0e8e1" and "a0a25f291c4d80bc9b70a1f4f9534ad893bb31c6" have entirely different histories.
aead4df707
...
a0a25f291c
@ -35,8 +35,8 @@ parser = argparse.ArgumentParser()
|
||||
|
||||
# general setting
|
||||
parser.add_argument('--data_path', default="datasets", type=str, nargs='?', help='path to the image dataset (datasets or datasets/ILSVRC/Data/CLS-LOC)')
|
||||
parser.add_argument('--seed', default=0, type=int, help='random seed')
|
||||
parser.add_argument('--device', default="cuda", type=str, nargs='?', help='setup device (cpu, mps or cuda)')
|
||||
parser.add_argument('--seed', default=111, type=int, help='random seed')
|
||||
parser.add_argument('--device', default="cuda:1", type=str, nargs='?', help='setup device (cpu, mps or cuda)')
|
||||
parser.add_argument('--repeats', default=32, type=int, nargs='?', help='times of calculating the training-free metric')
|
||||
parser.add_argument('--input_samples', default=16, type=int, nargs='?', help='input batch size for training-free metric')
|
||||
|
||||
@ -93,14 +93,11 @@ if __name__ == "__main__":
|
||||
print(f'Average SWAP score: {np.mean(swap_score)}')
|
||||
print(f'Elapsed time: {end_time - start_time:.2f} seconds')
|
||||
|
||||
results.append([np.mean(swap_score), acc, i])
|
||||
|
||||
results = pd.DataFrame(results, columns=['swap_score', 'valid_acc', 'index'])
|
||||
results.append([np.mean(swap_score), acc])
|
||||
|
||||
results = pd.DataFrame(results, columns=['swap_score', 'valid_acc'])
|
||||
print()
|
||||
print(f'Spearman\'s Correlation Coefficient: {stats.spearmanr(results.swap_score, results.valid_acc)[0]}')
|
||||
results.to_csv('swap_results.csv', float_format='%.4f', index=False)
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user