Implementation of NN and lecture 9 autoencoder