ディープラーニングに使用する画像のサイズについて
Show older comments
ネットから拾ってきた画像を学習さえたいのですが
%% 画像読み込み
imds = imageDatastore('catdog','IncludeSubfolders',true,'LabelSource','foldernames');
labelCount = countEachLabel(imds)
%% データで振り分ける
rateTrainFiles = 0.6;
[imdsTrain,imdsValidation] = splitEachLabel(imds,rateTrainFiles,'randomize');
%%画像サイズ
layers = [256,256,3];
aug_imdsTrain = augmentedImageDatastore(layers,imdsTrain);
aug_imdsValidation = augmentedImageDatastore(layers,imdsValidation);
options = trainingOptions('sgdm', ...
'InitialLearnRate',0.01,...
'MaxEpochs',4,...
'Shuffle','every-epoch',...
'ValidationData',imdsValidation,...
'VerboseFrequency',30,...
'Verbose',false, ...
'Plots','training-progress');
net=trainNetwork(imdsTrain,layers,options);
これでエラーが学習イメージサイズが違いますってでてしまいました
どこを直せばよろしいでしょうか?
Accepted Answer
More Answers (0)
Categories
Find more on プログラミング in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!