深層学習における画像処理について
Afficher commentaires plus anciens
深層学習を用いて画像分類を行いたいのですが、画像データのサイズがばらばらであるため、augmentedImageDatastoreを使って学習データのサイズを変換しようとしました。しかし、エラーが出て、学習をすることができません。どうすればよいのでしょうか?
エラーは以下の通りです。
検証イメージのサイズは 375x500x3 ですが、入力層にはサイズ 28x28x3 のイメージが必要です。
コードは、層の設定を省略して載せています。
clear;
a=imageDatastore(fullfile("animal_data"),"IncludeSubfolders",true,"LabelSource","foldernames");
labelCount=countEachLabel(a)
[imdsTrain, imdsValidation] = splitEachLabel(a,0.7,0.3,"randomized");
allTrain=augmentedImageDatastore([28 28 3],imdsTrain);
layers = [
imageInputLayer([28 28 3])
・・・・
net = trainNetwork(allTrain,layers,options);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!