BVLC/caffe — pull request #1662 by seanbell (2014-12-31 01:11:55+00:00)
Title: Fix caffe.io.resize_image for the case of constant images

"resize_image" in python/caffe/io.py fails for the case of a constant image. It returns NaN from a divide-by-zero.

This patch checks whether the image is a constant and then returns a new constant image of the correct shape.