how to force to use the Classify from the neural net toolbox?
Show older comments
how to force to use the Classify from the neural net toolbox? I am using transfer learning to train my images using alexnet. when I use classify it gives me following error:- Error using classify (line 123) Requires at least three arguments. When I look at classify in the help is pulling it from the Statistics and Machine learning toolbox. Do you know how to force to use the Classify from the neural net toolbox?
clear all;
close all;
clc;
testFolder = 'Test';
%creates imageDataStore object
testImages = imageDatastore(testFolder,'FileExtensions',{'.jpg','.tif'});
testImages.ReadFcn = @readImageFunction;%read images and resize it to the required size for the alex net
myNet = matfile('myNet.mat');%load the pre-trained net
predictedLabels = classify(myNet, testImages);
accuracy = mean(predictedLabels == testImages.Labels);
Accepted Answer
More Answers (1)
Sibi Isac
on 24 Dec 2017
0 votes
Categories
Find more on Object Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!