066fda55de8b2a65d57b6201d5b37daa6f7f399d,catalyst/rl/agents/head.py,ValueHead,forward,#ValueHead#Any#,41

Before Change


        x = x.squeeze_(dim=1).squeeze_(dim=-1)
        if self.num_atoms == 1 and self.out_features == 1:
            // make critic outputs (B, 1) instead of (B, )
            x = x.unsqueeze_(dim=1)
        return x


class PolicyHead(nn.Module):

After Change


        x = [z.squeeze_(dim=1).squeeze_(dim=-1) for z in x]
        if self.num_atoms == 1 and self.out_features == 1:
            // make critic outputs (B, 1) instead of (B, )
            x = [z.unsqueeze_(dim=1) for z in x]

        // B x num_heads x num_outputs x num_atoms (discrete)
        // B x num_heads x num_atoms (continuous)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: Scitator/catalyst
Commit Name: 066fda55de8b2a65d57b6201d5b37daa6f7f399d
Time: 2019-06-10
Author: khrulkov.v@gmail.com
File Name: catalyst/rl/agents/head.py
Class Name: ValueHead
Method Name: forward


Project Name: pfnet/optuna
Commit Name: 5e0da912918b2804f52e2a295007321cc44eb081
Time: 2020-11-18
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: optuna/integration/botorch.py
Class Name: BoTorchSampler
Method Name: sample_relative