From 62199df815dfc86d23eea19d8c461c57bc49f391 Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Wed, 9 Jan 2019 14:54:20 +0300 Subject: [PATCH] Fix edge_detection.py sample for Python 3 --- samples/dnn/edge_detection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/dnn/edge_detection.py b/samples/dnn/edge_detection.py index f242aab238..e3eeff2e36 100644 --- a/samples/dnn/edge_detection.py +++ b/samples/dnn/edge_detection.py @@ -27,8 +27,8 @@ class CropLayer(object): batchSize, numChannels = inputShape[0], inputShape[1] height, width = targetShape[2], targetShape[3] - self.ystart = (inputShape[2] - targetShape[2]) / 2 - self.xstart = (inputShape[3] - targetShape[3]) / 2 + self.ystart = (inputShape[2] - targetShape[2]) // 2 + self.xstart = (inputShape[3] - targetShape[3]) // 2 self.yend = self.ystart + height self.xend = self.xstart + width