Azzera filtri
Azzera filtri

trained stacked auto encoders

3 visualizzazioni (ultimi 30 giorni)
Srinidhi Gorityala
Srinidhi Gorityala il 19 Giu 2020
Risposto: Divya Gaddipati il 22 Giu 2020
Helo.. iam working on pothole dataset classification by using trained stacked auto encoders concept. Below i have attached the matlab code... in that code they have loaded the dataset using digitTrainCellArrayData but i want to load the pothole dataset .Could any one please help me with the code that how to load the dataset folder.
Thans in advance:)
% Load the training data into memory
[xTrainImages,tTrain] = digitTrainCellArrayData;
% Display some of the training images
clf
for i = 1:20
subplot(4,5,i);
imshow(xTrainImages{i});
end
rng('default')
hiddenSize1 = 100;
autoenc1 = trainAutoencoder(xTrainImages,hiddenSize1, ...
'MaxEpochs',400, ...
'L2WeightRegularization',0.004, ...
'SparsityRegularization',4, ...
'SparsityProportion',0.15, ...
'ScaleData', false);
view(autoenc1)
figure()
plotWeights(autoenc1);
feat1 = encode(autoenc1,xTrainImages);
hiddenSize2 = 50;
autoenc2 = trainAutoencoder(feat1,hiddenSize2, ...
'MaxEpochs',100, ...
'L2WeightRegularization',0.002, ...
'SparsityRegularization',4, ...
'SparsityProportion',0.1, ...
'ScaleData', false);
view(autoenc2)

Risposte (1)

Divya Gaddipati
Divya Gaddipati il 22 Giu 2020
One way is to use imageDatastore.
datasetPath = fullfile('/path/to/dataset');
imds = imageDatastore(datasetPath, ...
'IncludeSubfolders',true,'LabelSource','foldernames');
Refer to the Load and Explore Image Data section in the following example:
For more information on imageDatastore, you can refer to the below link

Prodotti


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by