summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław Dolata <snowball91b@gmail.com>2018-02-03 16:41:46 (GMT)
committerGitHub <noreply@github.com>2018-02-03 16:41:46 (GMT)
commitcc521a0801143c242f5da0e95737070c02ce15ab (patch)
treeaa17578c744f3bf7c7be1d528530a2f45158b408
parentd2627e9565d5fdc1a9bf8c964c762c7dc8ea9a3d (diff)
parent0050c207d5eb9b514d470ccb2125605f7adb0755 (diff)
downloadcaffe-cc521a0801143c242f5da0e95737070c02ce15ab.zip
caffe-cc521a0801143c242f5da0e95737070c02ce15ab.tar.gz
caffe-cc521a0801143c242f5da0e95737070c02ce15ab.tar.bz2
Merge pull request #6210 from mzsanford/classfier_deprecation_warning
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 983760a..64d804b 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 ef1f917..ceee5d3 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]