-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
23 lines (17 loc) · 834 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import argparse
from parse_config import ConfigParser
from run import run
def main(config):
run(config, train=False)
if __name__ == '__main__':
args = argparse.ArgumentParser(description='PyTorch Template')
args.add_argument('-c', '--config', default=None, type=str,
help='config file path (default: None)')
args.add_argument('-r', '--resume', default=None, type=str,
help='path to latest checkpoint (default: None)')
args.add_argument('-d', '--device', default=None, type=str,
help='indices of GPUs to enable (default: all)')
args.add_argument('-db', '--debug', default=False,
help='add this argument to use a small subset of the dataset, for debugging.')
config = ConfigParser.from_args(args)
main(config)