Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

There is a data blob of hdf5 [600000,1,7,256]. How to do mean subtraction using Caffe in matlab?

There is a data blob of hdf5 [600000,1,7,256].The function 'compute_image_mean.cpp' in Caffe is not fit for HDF5. So how to do mean subtraction using Caffe in matlab?

like image 965
Zhao Wulanaren Avatar asked Dec 18 '25 12:12

Zhao Wulanaren


1 Answers

Suppose you have a matrix in MATLAB of 60K vectors, how would you subtract the mean in MATLAB?

X=bsxfun(@minus, X, mean(X, 1));

Now that you subtracted the mean you can save X to hdf5 and feed it to caffe.

like image 73
Shai Avatar answered Dec 21 '25 05:12

Shai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!