Error while trying learning transfer example script Deep Learning Onramp
Afficher commentaires plus anciens
Hello,
While trying the transfer learning example (4/4) on Deep Learning Onramp, I get the following error
>> flower_ds = imageDatastore('Flowers','IncludeSubfolders',true,'LabelSource','foldernames');
>> [trainImgs,testImgs] = splitEachLabel(flower_ds,0.6);
>> numClasses = numel(categories(flower_ds.Labels));
>> net = alexnet;
>> layers = net.Layers;
>> layers(end-2) = fullyConnectedLayer(numClasses);
>> layers(end) = classificationLayer;
>> options = trainingOptions('sgdm','InitialLearnRate', 0.001);
>> [flowernet,info] = trainNetwork(trainImgs, layers, options);
Error using trainNetwork (line 170)
The training images are of size 224x224x3 but the input layer expects images of size 227x227x3.
Any help would appreciated, thanks
Fer
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!