From 949c993391954cede1cd532258e1574a1c0ede6b Mon Sep 17 00:00:00 2001 From: "Kaustubh \"Kauby\" Sakhalkar" Date: Sun, 25 Feb 2018 14:42:35 +0100 Subject: [PATCH] Change To INT to match correct datatype --- src/first_stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/first_stage.py b/src/first_stage.py index 7c1e4b9..fa52e73 100644 --- a/src/first_stage.py +++ b/src/first_stage.py @@ -26,7 +26,7 @@ def run_first_stage(image, net, scale, threshold): # scale the image and convert it to a float array width, height = image.size sw, sh = math.ceil(width*scale), math.ceil(height*scale) - img = image.resize((sw, sh), Image.BILINEAR) + img = image.resize((int(sw), int(sh)), Image.BILINEAR) img = np.asarray(img, 'float32') img = Variable(torch.FloatTensor(_preprocess(img)), volatile=True)