-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_resnet.py
37 lines (33 loc) · 1 KB
/
run_resnet.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from subprocess import run
# python -u run_resnet.py
cuda = 0 # which gpu to use
dataset = 'cifar10'
logs_path = 'logs_resnet' + '_' + dataset
manualSeed = 99
workers = 2
for model in ['resnet20', 'preact_resnet20']:
commands = [
'python', '-u', 'train_resnet.py',
'--dataset=' + dataset,
'--model=' + model,
'-c=' + str(cuda),
'--workers=' + str(workers),
'--manualSeed=' + str(manualSeed),
]
run(commands)
for model in ['resnet20', 'preact_resnet20']:
f = True
for k in [1, 2, 3]:
for ff in [False, True]:
commands = [
'python', '-u', 'train_resnet.py',
'--dataset=' + dataset,
'--model=' + model,
'-k=' + str(k),
'-c=' + str(cuda),
'--workers=' + str(workers),
'--manualSeed=' + str(manualSeed),
]
if f: commands.append('-f')
if ff: commands.append('--ff')
run(commands)