This commit is contained in:
Glenn Jocher 2018-09-02 13:17:28 +02:00
parent 1c72eb03f0
commit 8b6f1595e0
1 changed files with 6 additions and 2 deletions

View File

@ -22,10 +22,14 @@ print(opt)
cuda = torch.cuda.is_available() and opt.use_cuda cuda = torch.cuda.is_available() and opt.use_cuda
device = torch.device('cuda:0' if cuda else 'cpu') device = torch.device('cuda:0' if cuda else 'cpu')
# Get data configuration # Configure run
data_config = parse_data_config(opt.data_config_path) data_config = parse_data_config(opt.data_config_path)
test_path = data_config['valid']
num_classes = int(data_config['classes']) num_classes = int(data_config['classes'])
if platform == 'darwin': # MacOS (local)
test_path = data_config['valid']
else: # linux (cloud, i.e. gcp)
test_path = '../coco/trainvalno5k.part'
# Initiate model # Initiate model
model = Darknet(opt.cfg, opt.img_size) model = Darknet(opt.cfg, opt.img_size)