From 1c72eb03f03bc1f5112c0b224762b7f83d92cc5a Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 2 Sep 2018 13:13:22 +0200 Subject: [PATCH] updates --- test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.py b/test.py index 7bcef824..a0a71b14 100644 --- a/test.py +++ b/test.py @@ -31,7 +31,7 @@ num_classes = int(data_config['classes']) model = Darknet(opt.cfg, opt.img_size) # Load weights -if opt.weights_path('.weights'): # darknet format +if opt.weights_path.endswith('.weights'): # darknet format load_weights(model, opt.weights_path) elif opt.weights_path.endswith('.pt'): # pytorch format checkpoint = torch.load(opt.weights_path, map_location='cpu')