From f9aedbf7816bb70cb15aa31b69c5e3c86482ae56 Mon Sep 17 00:00:00 2001 From: Infinity_lee Date: Fri, 16 Sep 2022 09:17:27 +0800 Subject: [PATCH] Update transform.py fix some docs errors --- python/paddle/distribution/transform.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/distribution/transform.py b/python/paddle/distribution/transform.py index d7a512aade2e5..de8e4ebfa8882 100644 --- a/python/paddle/distribution/transform.py +++ b/python/paddle/distribution/transform.py @@ -58,7 +58,7 @@ class Transform(object): Suppose :math:`X` is a K-dimensional random variable with probability density function :math:`p_X(x)`. A new random variable :math:`Y = f(X)` may be defined by transforming :math:`X` with a suitably well-behaved funciton - :math:`f`. It suffices for what follows to note that if f is one-to-one and + :math:`f`. It suffices for what follows to note that if `f` is one-to-one and its inverse :math:`f^{-1}` have a well-defined Jacobian, then the density of :math:`Y` is @@ -648,8 +648,8 @@ class IndependentTransform(Transform): To see this, consider the ``ExpTransform`` applied to a Tensor which has sample, batch, and event ``(S,B,E)`` shape semantics. Suppose the Tensor's - paritioned-shape is ``(S=[4], B=[2, 2], E=[3])`` , reinterpreted_batch_rank - is 1. Then the reinterpreted Tensor's shape is ``(S=[4], B=[2], E=[2, 3])`` . + paritioned-shape is ``(S=[4], B=[2,2], E=[3])`` , reinterpreted_batch_rank + is 1. Then the reinterpreted Tensor's shape is ``(S=[4], B=[2], E=[2,3])`` . The shape returned by ``forward`` and ``inverse`` is unchanged, ie, ``[4,2,2,3]`` . However the shape returned by ``inverse_log_det_jacobian`` is ``[4,2]``, because the Jacobian determinant is a reduction over the