a1c1bdc135a1f030a5c306452c02242669e405d4,mushroom/policy/torch_policy.py,TorchPolicy,distribution,#TorchPolicy#Any#,39

Before Change


        return torch.squeeze(a, dim=0).detach().numpy()

    def distribution(self, state):
        s = torch.tensor(state, dtype=torch.float)
        return self.distribution_t(s)

    def entropy(self, state=None):
        s = torch.tensor(state, dtype=torch.float) if state is not None else None

After Change


        return torch.squeeze(a, dim=0).detach().cpu().numpy()

    def distribution(self, state):
        s = self._to_tensor(state)
        return self.distribution_t(s)

    def entropy(self, state=None):
        s = self._to_tensor(state) if state is not None else None
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: AIRLab-POLIMI/mushroom
Commit Name: a1c1bdc135a1f030a5c306452c02242669e405d4
Time: 2019-08-21
Author: boris.ilpossente@hotmail.it
File Name: mushroom/policy/torch_policy.py
Class Name: TorchPolicy
Method Name: distribution


Project Name: AIRLab-POLIMI/mushroom
Commit Name: a1c1bdc135a1f030a5c306452c02242669e405d4
Time: 2019-08-21
Author: boris.ilpossente@hotmail.it
File Name: mushroom/policy/torch_policy.py
Class Name: TorchPolicy
Method Name: entropy


Project Name: AIRLab-POLIMI/mushroom
Commit Name: a1c1bdc135a1f030a5c306452c02242669e405d4
Time: 2019-08-21
Author: boris.ilpossente@hotmail.it
File Name: mushroom/policy/torch_policy.py
Class Name: TorchPolicy
Method Name: __call__