summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Sanford <matt@mzsanford.com>2018-02-02 13:23:23 -0800
committerMatt Sanford <matt@mzsanford.com>2018-02-02 13:23:23 -0800
commit0050c207d5eb9b514d470ccb2125605f7adb0755 (patch)
treeaa17578c744f3bf7c7be1d528530a2f45158b408
parentd2627e9565d5fdc1a9bf8c964c762c7dc8ea9a3d (diff)
downloadcaffe-0050c207d5eb9b514d470ccb2125605f7adb0755.tar.gz
caffe-0050c207d5eb9b514d470ccb2125605f7adb0755.tar.bz2
caffe-0050c207d5eb9b514d470ccb2125605f7adb0755.zip
Update Classifier and Detector to avoid deprecation warning
-rw-r--r--python/caffe/classifier.py2
-rw-r--r--python/caffe/detector.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python/caffe/classifier.py b/python/caffe/classifier.py
index 983760a7..64d804be 100644
--- a/python/caffe/classifier.py
+++ b/python/caffe/classifier.py
@@ -23,7 +23,7 @@ class Classifier(caffe.Net):
def __init__(self, model_file, pretrained_file, image_dims=None,
mean=None, input_scale=None, raw_scale=None,
channel_swap=None):
- caffe.Net.__init__(self, model_file, pretrained_file, caffe.TEST)
+ caffe.Net.__init__(self, model_file, caffe.TEST, weights=pretrained_file)
# configure pre-processing
in_ = self.inputs[0]
diff --git a/python/caffe/detector.py b/python/caffe/detector.py
index ef1f9173..ceee5d36 100644
--- a/python/caffe/detector.py
+++ b/python/caffe/detector.py
@@ -35,7 +35,7 @@ class Detector(caffe.Net):
def __init__(self, model_file, pretrained_file, mean=None,
input_scale=None, raw_scale=None, channel_swap=None,
context_pad=None):
- caffe.Net.__init__(self, model_file, pretrained_file, caffe.TEST)
+ caffe.Net.__init__(self, model_file, caffe.TEST, weights=pretrained_file)
# configure pre-processing
in_ = self.inputs[0]