ディープラーニングに使用する画像のサイズについて
古いコメントを表示
ネットから拾ってきた画像を学習さえたいのですが
%% 画像読み込み
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!