Reputation: 1
I'm implementing CNN for signal classification problem, for which I need to create the database of the signals which I'll be giving as input to the CNN.
To create the database there is a function called imageDatastore
and some other database functions, which will create the database of images only. If signals which are stored in .mat (an array of size nx1) format and are given to this function, it will create the database, but will give problem at the time of trainNetwork, error as unable to read the file.
This is the code I'm using to create the database, but its not working while training the network.
dbs = imageDatastore(fullfile(rootFolder, categories),'IncludeSubfolders', true, 'FileExtensions',{'.mat'}, 'LabelSource', 'foldernames');
What changes should I make in the existing functions so as to get the database of signals?
Upvotes: 0
Views: 355
Reputation: 1
Use datastore instead:
ims = datastore(fullfile(matlabroot,'toolbox','nnet','nndemos', ...
'nndatasets','A'),...
'IncludeSubfolders',true,'Type', 'tabulartext');
For labels, pick it up through imagedatastore
.
Upvotes: 0