how can i make alexnet accept 277x277x1 images
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
abdo elsayed
el 29 de Dic. de 2017
Comentada: Walter Roberson
el 22 de En. de 2023
i got error in example TransferLearningUsingAlexNetExample Error using trainNetwork (line 140) The training images are of size 227x227x1 but the input layer expects images of size 227x227x3. my dataset 277X277x1
3 comentarios
arun anoop m
el 17 de Jul. de 2020
a=imread(' ');
l=alexnet;
a=imresize(a,[227 227]);
s=classify(l,a);
imshow(a);
try this.
Eline Geerits
el 4 de Abr. de 2022
How can I apply this to an DataSet. I have abaout 4000 Images I have to resize so it would take way to long to do this for every Image indevidually.
Respuesta aceptada
Brendan Hamm
el 29 de Dic. de 2017
You can resize an image with the imresize function. Now since your images are of size 277x277x1 I will assume they are grayscale, but AlexNet was trained with RGB values and are thus 227x227x 3. It is not possible for you to recover color information from a grayscale image. You may be required to retrain the entire network with grayscale images.
I suggest for more questions on getting started with Deep Learning you check out the FREE Deep Learning OnRamp: https://matlabacademy.mathworks.com/
9 comentarios
arun anoop m
el 17 de Jul. de 2020
Walter Roberson
el 22 de En. de 2023
These days you should use an augmented image datastore as that can automatically resize and automatically convert to gray or rgb.
Más respuestas (2)
Atika Aftab
el 10 de Feb. de 2020
how can i make [224 224 1] img size ?
1 comentario
arun anoop m
el 17 de Jul. de 2020
I hope
a=imread(' ');
a=imresize(a,[224 224]);
Ayshath Afra
el 2 de Abr. de 2020
The training images are of size 256x256x3 but the input layer expects images of size 224x224x3.
pls help me to solve this error
1 comentario
Michael Keeling
el 5 de Jun. de 2020
Editada: Michael Keeling
el 5 de Jun. de 2020
You can make an augmented datastore of the images that resizes them auomatically, while leaving your raw images the same
Ver también
Categorías
Más información sobre Deep Learning Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!