deep autoencoder by using (trainAutoencoder and stack) functions
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!