https://medium.com/@monocosmo77/working-with-autoregressive-flow-part1-machine-learning-2023-9a34e421e05e