avoid non-integer array indices
authorDrew Abbot <drewabbot@gmail.com>
Thu, 28 Apr 2016 06:25:09 +0000 (23:25 -0700)
committerDrew Abbot <drewabbot@gmail.com>
Thu, 28 Apr 2016 06:25:09 +0000 (23:25 -0700)
python/caffe/classifier.py

index 537193d..ea29fed 100644 (file)
@@ -79,6 +79,7 @@ class Classifier(caffe.Net):
                 -self.crop_dims / 2.0,
                 self.crop_dims / 2.0
             ])
+            crop = crop.astype(int)
             input_ = input_[:, crop[0]:crop[2], crop[1]:crop[3], :]
 
         # Classify