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