e07f9a24e60a8acc756efc0728adb257d0474c2f,catalyst/rl/agent/policy.py,RealNVPPolicy,forward,#RealNVPPolicy#Any#Any#Any#,76
Before Change
)
sigma = torch.ones_like(mu).to(mu.device)
z = mu if deterministic else normal_sample(mu, sigma)
log_pi = normal_logprob(mu, sigma, z)
z, log_pi = self.coupling1.forward(z, state_embedding, log_pi)
z, log_pi = self.coupling2.forward(z, state_embedding, log_pi)
action, log_pi = self.squashing_layer.forward(z, log_pi)
After Change
bool_logprob = isinstance(logprob, bool) and logprob
value_logprob = isinstance(logprob, torch.Tensor)
assert not value_logprob, "Not implemented behaviour"
action_logprob = normal_logprob(loc, scale, action)
action, action_logprob = \
self.coupling1.forward(action, state_embedding, action_logprob)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
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: RealNVPPolicy
Method Name: forward
Project Name: Scitator/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