-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
23 lines (18 loc) · 780 Bytes
/
Copy pathtest.py
File metadata and controls
23 lines (18 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import subprocess, os, warnings, sys
if __name__ == '__main__':
results_folder = 'results_test'
try:
os.makedirs(results_folder)
except OSError:
warnings.warn(f'Folder {results_folder} already exits.')
# for non-vit models
config_archs = ['mobilevit_xxs', 'mobilevit_xs', 'mobilevit_s', 'vgg16', 'vgg19', 'resnet18', 'resnet34', 'vit']
for config_arch in config_archs:
command = [
sys.executable, 'main.py', config_arch,
'--results_filename', os.path.join(results_folder, 'results_vit') if config_arch == 'vit' \
else os.path.join(results_folder, 'results_not_vit'),
'--num_epochs', '1',
'--data_folder', 'example-data'
]
subprocess.run(command)