MATLAB: How to obtain image size [227 227 3]

2d3dalexnetcnndimensionimageimagesNetworkneuralsize;

I'm currently working on using my own images in a pretrained neural network ( https://www.mathworks.com/help/nnet/ref/alexnet.html ) and it's demanding an image size of [227 227 3]. My images are 2D binary images (227×227). How can I achieve the desired size of images?

Best Answer

I would assume simply replicating your image to RGB with repmat should work.