diff --git a/models/yolo.py b/models/yolo.py index fb01aaa..e88db79 100644 --- a/models/yolo.py +++ b/models/yolo.py @@ -310,11 +310,11 @@ if __name__ == '__main__': # Create model model = Model(opt.cfg).to(device) - model.train() # Profile if opt.profile: - img = torch.rand(16 if torch.cuda.is_available() else 1, 3, 640, 640).to(device) + model.eval().fuse() + img = torch.rand(8 if torch.cuda.is_available() else 1, 3, 640, 640).to(device) y = model(img, profile=True) # Test all models