Error in alexnet first conv layer 11x11x96

any body can bring a reson for following
Invalid network.
Caused by:
Layer 'conv1': Input size mismatch. Size of input to this layer is different from the
expected input size.
Inputs to this layer:
from layer 'input' (28×28×1 output)
Im sure we oroperly change my image to 227 227 3

Réponses (1)

Walter Roberson
Walter Roberson le 7 Fév 2026

0 votes

You might want to use https://www.mathworks.com/help/deeplearning/ref/augmentedimagedatastore.html specifying the output size and the ColorProcessing option (in case the input is grayscale, it can be converted to RGB automatically.)

Catégories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by