Log-likelihood

def logprob(self, action_sample, pd_params):
        """ Log-likelihood """
        means = pd_params[:, :, 0]
        log_std = pd_params[:, :, 1]

        std = torch.exp(log_std)

        z_score = (action_sample - means) / std

        return - (0.5 * ((z_score**2 + self.LOG2PI).sum(dim=-1)) + log_std.sum(dim=-1))