How can I create a stack of autoencoders and a softmaxLayer from a Vector of autoencoders?
2 views (last 30 days)
Show older comments
I am trying to create an stack of autoencoders, from the code below:
stackedNet = stack(vector_autoencoders(:),softnet);
but I'm getting the following message: "Expected one output from a curly brace or dot indexing expression, but there were 2 results."
There are 2 autoencoders in my vector with proper dimensions. If I use the following code it works:
stackedNet = stack(vector_autoencoders(1),vector_autoencoders(2),softnet);
What am I doing wrong? Is there any other way to use stack, without enumerating every autoencoder?
0 Comments
Answers (1)
DS
on 6 Apr 2018
Hi Pablo,
if vector_autoencoders is a cell array you can add your AE in a for loop by:
vector_autoencoders{end+1} = trainAutoencoder(...)
Afterwards, you can stack them as follows:
stackedNet = stack(vector_autoencoders{:,:},softnet);
0 Comments
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!