https://medium.com/@monocosmo77/working-with-autoregressive-flow-part7-machine-learning-2023-f3d9a1e449f4