Skip to content

Commit

Permalink
Update Classifier and Detector to avoid deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mzsanford committed Feb 2, 2018
1 parent d2627e9 commit 0050c20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/caffe/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion python/caffe/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 0050c20

Please sign in to comment.