https://medium.com/@monocosmo77/working-with-autoregressive-flow-part3-machine-learning-2023-0f13f960b4db