I'm trying to run https://www.vlfeat.org/matconvnet/quick/,
I wrote the following codes (network is Alexnet):
im = imread('/home/levi/Codes/MM_space//n01443537_22563.JPEG');
im_ = single(im);
im_ = imresize(im_, net.meta.normalization.imageSize(1:2));
Until this part is fine, _im
becomes a
227*227*3 single
However, after running this:
im_ = bsxfun(@minus, im_, net.meta.normalization.averageImage);
I receive the error:
Error using bsxfun Non-singleton dimensions of the two input arrays must match each other
According to the webpage it should work, but is not working... I also did a little search but still struggling with solving it.
net.meta.normalization.averageImage
is
3×1 single column vector
122.7395
114.8967
101.5919
Thank you for your help in advance