Normalizing Flow Implementation