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)

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

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 7 Feb 2026

Answered:

on 7 Feb 2026

Community Treasure Hunt

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

Start Hunting!