How To Implement Autoencoder In Python For Loops