Fix Choice and Permutation not respecting the RandomVariable contract
These two RVs don't fall into the traditional RandomVariable contract because they don't have a concept of `batch_ndim`s. The hard-coded ndim params and ndim support were wrong and need to be defined for every node.
* ChoiceRV was removed in favor of ChoiceWithoutReplacementRV which handles the cases without replacement. Those with replacement can be trivially be implemented with other basic RVs.
* Both Permutation and ChoiceWithoutReplacement now support batch ndims
* Avoid materializing the implicit arange
正在显示
请
注册
或者
登录
后发表评论