Matthew Johnson c41c4de5a5
lower fori_loop to scan when possible (#2414)
When a fori_loop specialized on trip count is to be evaluated, it's
preferable to generate a scan rather than a while_loop because the
former is reverse-mode differentiable while the latter is not. Otherwise
they're essentially the same; in particular, no extensive inputs/outputs
arise unless reverse-mode autodiff is applied.

Also fixes #2412.
2020-03-13 15:15:55 -07:00
..
2020-03-09 20:42:08 +01:00
2020-03-09 13:21:30 -07:00
2020-03-09 20:42:08 +01:00
2019-11-01 09:28:48 +00:00
2020-03-09 10:14:23 +01:00
2020-03-09 20:42:08 +01:00
2020-03-09 20:42:08 +01:00