ディープラーニングに使用する画像のサイズについて
显示 更早的评论
ネットから拾ってきた画像を学習さえたいのですが
%% 画像読み込み
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);
これでエラーが学習イメージサイズが違いますってでてしまいました
どこを直せばよろしいでしょうか?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 プログラミング 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!