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

Answers (1)

Walter Roberson
Walter Roberson on 7 Feb 2026 at 23:07
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.)

Categories

Asked:

on 7 Feb 2026 at 22:09

Answered:

on 7 Feb 2026 at 23:07

Community Treasure Hunt

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

Start Hunting!