MATLAB: The input images for activations must be of size equal to or greater than [224 224 3].

cnn activation method

my code is:
augmentedTrainset=augmentedImageDatastore(imagesize,...
trainset,'ColorPreprocessing','rgb2gray');
augmentedTestset=augmentedImageDatastore(imagesize,...
testset,'ColorPreprocessing','rgb2gray');
featureLayer = 'fc1000';
trainingFeatures = activations(net, augmentedTrainset, featureLayer, ...
'MiniBatchSize', 39, 'OutputAs', 'columns');
[224 224 3] image size
And I take an error as "The input images for activations must be of size equal to or greater than [224 224 3]."
Why I'm taking this error, how can I fix it?

Best Answer

Hi,
Is your image [224 224 3] or of different order?
And try the below code once
augmentedTrainset=augmentedImageDatastore(imagesize,...
trainset);
augmentedTestset=augmentedImageDatastore(imagesize,...
testset);
featureLayer = 'fc1000';
trainingFeatures = activations(net, augmentedTrainset, featureLayer, ...
'MiniBatchSize', 39, 'OutputAs', 'columns');