https://medium.com/@monocosmo77/working-with-autoregressive-flow-part6-machine-learning-2023-258cbcd396df