深層学習における画像処理について
显示 更早的评论
深層学習を用いて画像分類を行いたいのですが、画像データのサイズがばらばらであるため、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!