From 8b6f1595e0eaa444a78bfbb0d568d15c1077f1d8 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 2 Sep 2018 13:17:28 +0200 Subject: [PATCH] updates --- test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index a0a71b14..e1ce5d54 100644 --- a/test.py +++ b/test.py @@ -22,10 +22,14 @@ print(opt) cuda = torch.cuda.is_available() and opt.use_cuda device = torch.device('cuda:0' if cuda else 'cpu') -# Get data configuration +# Configure run data_config = parse_data_config(opt.data_config_path) -test_path = data_config['valid'] 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 model = Darknet(opt.cfg, opt.img_size)