-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Cropping the mean file #1928
Copy link
Copy link
Closed
Description
Since the huge update, I'm having to fix lots of API changes with my python interfaces to caffe. How do I wade through the commit stream to find out what all needs to change?
This is my most recent problem. I try this:
classifier = caffe.Classifier(deploy_file, snapshot_file,
image_dims = (height, width),
mean = image_mean,
raw_scale = 255,
channel_swap = channel_swap,
)
classifier.predict([image], oversample=False)And I get this error:
ValueError: operands could not be broadcast together with shapes (3,227,227) (3,256,256) (3,227,227)
Apparently, the mean_file has to be cropped before passing it to the Classifier constructor now. How was I supposed to know that? I don't see it in any of these commits. And how am I supposed to do it? Should I be cropping it myself manually, or should I try to use Classifier.transformer.preprocess()?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels