def log_prob(self, x):
        """Calculate the log probability of given sample in data space."""

        z, log_det = self.backward_p(x)
        return self.prior.log_prob(z) + log_det
Calculate the log probability of given sample in data space.
mmpose/mmpose/models/utils/realnvp.py