title: How to use stacked autoencoders for pretraining
body: <p>Let's say I wish to used stacked autoencoders as a pretraining step.</p>
  
  <p>Let's say my full autoencoder is 40-30-10-30-40.</p>
  
  <p>My steps are:</p>
  
  <ol>
  <li>Train a 40-30-40 using the original 40 features data set in both input and output layers.</li>
  <li>Using the trained encoder part only of the above i.e. 40-30 encoder, derive a new 30 feature representation of the original 40 features.</li>
  <li>Train a 30-10-30 using the new 30 features data set (derived in step 2) in both input and output layers.</li>
  <li>Take the trained encoder from step 1 ,40-30, and feed it into the encoder from step 3,30-10, giving a 40-30-10 encoder.</li>
  <li>Take the 40-30-10 encoder from step 4 and use it as the input the NN.</li>
  </ol>
  
  <p>a) Is that correct?</p>
  
  <p>b) Do I freeze the weights in the 40-30-10 encoder when training the NN which would be the same as pregenerating the 10 feature representation from the original 40 feature data set and training on the new 10 feature representation data set.</p>
  
  <p>PS. I already have a question out asking about whether I need to tie the weights of the encoder and decoder  </p>