Reputation: 566
I am trying to learn DL with an example. However, running the following code results in an error
imds = imageDatastore(fullfile(rootFolder),'Labels',lab.labels35_16);
imds.ReadFcn = @(filename)readAndPreprocessImage(filename);
[trainingSet, testSet] = splitEachLabel(imds, 0.3, 'randomize');
trainingFeatures = activations(convnet, trainingSet, featureLayer, ...
'MiniBatchSize', 32, 'OutputAs', 'columns');
sAnd the error is Undefined function 'categories' for input arguments of type 'double'. I understand that categories in he original example is string based labels. But mine is int values. Not sure why it isn't working. Kindly help
Upvotes: 0
Views: 325
Reputation: 34
From the documentation of catogories, it seems like the input needs to be a categorical. You might have to do categories(categorical()).
Upvotes: 1