深層学習における画像処理について
古いコメントを表示
深層学習を用いて画像分類を行いたいのですが、画像データのサイズがばらばらであるため、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);
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!