deep autoencoder by using (trainAutoencoder and stack) functions
4 views (last 30 days)
Show older comments
Dears, when i implements this below code i take the error thats in the attach? what is the resaon i think its because of the version of matlab or what? my version is 2015 [X,T] = wine_dataset;
hiddenSize = 10; autoenc1 = trainAutoencoder(X,hiddenSize,... 'L2WeightRegularization',0.001,... 'SparsityRegularization',4,... 'SparsityProportion',0.05,... 'DecoderTransferFunction','purelin');
features1 = encode(autoenc1,X);
hiddenSize = 10; autoenc2 = trainAutoencoder(features1,hiddenSize,... 'L2WeightRegularization',0.001,... 'SparsityRegularization',4,... 'SparsityProportion',0.05,... 'DecoderTransferFunction','purelin',... 'ScaleData',false);
features2 = encode(autoenc2,features1);
softnet = trainSoftmaxLayer(features2,T,'LossFunction','crossentropy');
deepnet = stack(autoenc1,autoenc2,softnet);
deepnet = train(deepnet,X,T);
wine_type = deepnet(X);
plotconfusion(T,wine_type);
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!