caffe icon indicating copy to clipboard operation
caffe copied to clipboard

The size of the mean isn't applied properly in MemoryDataLayer

Open rold2007 opened this issue 11 years ago • 2 comments

As mentioned in the forum here the mean is applied without verifying its size correctly.

In BaseDataLayer::LayerSetUp() the mean is loaded from the file into a pointer. Later, when calling MemoryDataLayer::AddDatumVector() this same pointer is sent to the data_transformer but with no information about the width/height of the data. When using the mean file associated with ilsvrc12, the mean data is actually a 256x256 image. The examples for ilsvrc12 usually take a 227x227 image in input, thus the mean pointer isn't being indexed correctly in DataTransformer::Transform().

I think that the mean data should be resized automatically when loaded, but I'm not sure this is the right solution.

rold2007 avatar Dec 22 '14 04:12 rold2007

cc: @sguada

bhack avatar Jan 02 '15 14:01 bhack

Closing according to #5528. This use case can be handled by a Python layer or Input layer.

shelhamer avatar Apr 13 '17 21:04 shelhamer