how can i make alexnet accept 277x277x1 images

조회 수: 196(최근 30일)
abdo  elsayed
abdo elsayed 2017년 12월 29일
댓글: Eline Geerits 2022년 4월 4일
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
Eline Geerits
Eline Geerits 2022년 4월 4일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Brendan Hamm
Brendan Hamm 2017년 12월 29일
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:
  댓글 수: 8
arun anoop m
arun anoop m 2020년 7월 17일
Thank you Brendan Hamm sir for recommending useful training course Deep Learning Onramp.

댓글을 달려면 로그인하십시오.

추가 답변(2개)

Atika Aftab
Atika Aftab 2020년 2월 10일
how can i make [224 224 1] img size ?
  댓글 수: 1
arun anoop m
arun anoop m 2020년 7월 17일
I hope
a=imread(' ');
a=imresize(a,[224 224]);

댓글을 달려면 로그인하십시오.

Ayshath Afra
Ayshath Afra 2020년 4월 2일
The training images are of size 256x256x3 but the input layer expects images of size 224x224x3.
pls help me to solve this error
  댓글 수: 1
Michael Keeling
Michael Keeling 2020년 6월 5일
You can make an augmented datastore of the images that resizes them auomatically, while leaving your raw images the same

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by