How to import dataset in deep network designer for a signal ? (Using 2021b )
1 view (last 30 days)
Show older comments
I want to design 1D CNN (Sequenceial) using deep netwrork designer and for that i want to import dataset . Can any one guide me ? I have put the screenshot of network and dimenstion of dataset.
please guide me ..how to import data and run a 1D CNN model using deep network designer.
1 Comment
Answers (1)
T.Nikhil kumar
on 12 Apr 2024
Hello bhvain,
It appears that you want to design 1D CNN using deep network designer and train it with your data which is in the form of a cell array.
The Deep Network Designer only accepts data in the form of datastore objects that are compatible with the “trainNetwork” function.
I'll assume each cell of ‘Xtrain’ and ‘Xtest’ contains data for a single observation, which might be a sequence or an array of features for a single sample. Note that the sequence/array should be of same length for all samples.
You can create ‘arrayDatastore’ objects for the ‘Xtrain’ and ‘Ytrain’ data in your workspace. Combine these datastores using ‘combine’ function to form the training datastore.
adsXTrain = arrayDatastore(Xtrain);
adsYTrain = arrayDatastore(Ytrain);
cdsTrain = combine(adsXTrain,adsYTrain);
Now create a similar combined datastore for ‘Xtest’ and ‘Ytest’ variables to form the validation data store.
adsXTest = arrayDatastore(Xtest);
adsYTest = arrayDatastore(Ytest);
cdsTest = combine(adsXTest,adsYTest);
Now, in the ‘Data’ tab of Deep Network Designer, select ‘Import custom data’ and choose the appropriate datastores for training(cdsTrain) and validation(cdsTest). After this, you can proceed with the training.
Refer to the ‘Sequence and Time series’ task section in the below mentioned documentation for more reference:
Hope this is what you were looking for.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!