From a5d4f571962a936a23b282336f14da4caaf04cc9 Mon Sep 17 00:00:00 2001 From: MayYouBeProsperous <99723454+MayYouBeProsperous@users.noreply.github.com> Date: Mon, 19 Sep 2022 11:16:28 +0800 Subject: [PATCH] [Cherry-pick] fix bug for TransformedDistribution (#46157) fix bug for TransformedDistribution --- python/paddle/distribution/transformed_distribution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/distribution/transformed_distribution.py b/python/paddle/distribution/transformed_distribution.py index ce386971e5f..160af5e4870 100644 --- a/python/paddle/distribution/transformed_distribution.py +++ b/python/paddle/distribution/transformed_distribution.py @@ -77,7 +77,7 @@ class TransformedDistribution(distribution.Distribution): max(len(base.event_shape)-chain._domain.event_rank, 0) super(TransformedDistribution, self).__init__( transformed_shape[:len(transformed_shape) - transformed_event_rank], - transformed_shape[:len(transformed_shape) - transformed_event_rank]) + transformed_shape[len(transformed_shape) - transformed_event_rank:]) def sample(self, shape=()): """Sample from ``TransformedDistribution``. -- GitLab