I guess, you have already read the answer.
I am linking the post just for completion!

  
    
    
    How to create and train a tied autoencoder? 
  
  
    To me, mixed approach looks better. 
For the record, I have updated the gist to verify that it works too.