if autoencoder's regCoeff !=0; then it  relies on mem