You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mxnet.apache.org by Xi Wang <no...@github.com.INVALID> on 2021/01/01 09:44:54 UTC

Re: [apache/incubator-mxnet] [RFC + BUG?] Implementation of Categorical distribution (#19722)

Hi @dibgerge 
The reason "num_events" is required is that we cannot call `logit.shape` or `prob.shape` in the symbolic mode, as you can see, TF would use a very complicated subroutine to get num_events in the symbol mode: https://github.com/tensorflow/probability/blob/v0.11.1/tensorflow_probability/python/distributions/categorical.py#L352
while torch does not have such issue : https://github.com/pytorch/pytorch/blob/master/torch/distributions/categorical.py#L57



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/incubator-mxnet/issues/19722#issuecomment-753294152