e07f9a24e60a8acc756efc0728adb257d0474c2f,catalyst/rl/agent/policy.py,GaussPolicy,forward,#GaussPolicy#Any#Any#Any#,33

Before Change


        log_sigma = torch.clamp(log_sigma, LOG_SIG_MIN, LOG_SIG_MAX)
        sigma = torch.exp(log_sigma)
        z = mu if deterministic else normal_sample(mu, sigma)
        log_pi = normal_logprob(mu, sigma, z)
        action, log_pi = self.squashing_layer.forward(z, log_pi)

        if logprob:
            return action, log_pi

After Change


        value_logprob = isinstance(logprob, torch.Tensor)
        assert not value_logprob, "Not implemented behaviour"

        action_logprob = normal_logprob(loc, scale, action)
        action, action_logprob = \
            self.squashing_layer.forward(action, action_logprob)

        if bool_logprob:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: catalyst-team/catalyst
Commit Name: e07f9a24e60a8acc756efc0728adb257d0474c2f
Time: 2019-07-23
Author: scitator@gmail.com
File Name: catalyst/rl/agent/policy.py
Class Name: GaussPolicy
Method Name: forward


Project Name: catalyst-team/catalyst
Commit Name: e07f9a24e60a8acc756efc0728adb257d0474c2f
Time: 2019-07-23
Author: scitator@gmail.com
File Name: catalyst/rl/agent/policy.py
Class Name: RealNVPPolicy
Method Name: forward