Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I changed line:

transformer.set_mean('data', data)

to:

transformer.set_mean('data', np.array([np.mean(data[0]), np.mean(data[1]), np.mean(data[2])]))

and it's fine. caffe.io.transformer does pixelwise mean subtraction instead of channelwise subtraction and this caused a problem. When I apply operation np.max(np.abs(a - b)) to compare blobs I still get a small error in order of magnitude 1e-5. But for me it doesn't make much difference, so I didin't investigate it further to long, I think it should be plain 0 though.