Canonical normalizing flows for manifold learning