e4b6611cb73ef7658f028831be1aa6bd85ecbed0,src/garage/torch/policies/deterministic_mlp_policy.py,DeterministicMLPPolicy,get_action,#DeterministicMLPPolicy#Any#,48

Before Change


        
        with torch.no_grad():
            x = self(torch.Tensor(observation).unsqueeze(0))
            return x.squeeze(0).numpy(), dict()

    def get_actions(self, observations):
        Get actions given observations.

After Change


            observation = self._env_spec.observation_space.flatten(observation)
        with torch.no_grad():
            observation = torch.Tensor(observation).unsqueeze(0)
            action, agent_infos = self.get_actions(observation)
            return action[0], {k: v[0] for k, v in agent_infos.items()}

    def get_actions(self, observations):
        Get actions given observations.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rlworkgroup/garage
Commit Name: e4b6611cb73ef7658f028831be1aa6bd85ecbed0
Time: 2020-08-14
Author: 38871737+avnishn@users.noreply.github.com
File Name: src/garage/torch/policies/deterministic_mlp_policy.py
Class Name: DeterministicMLPPolicy
Method Name: get_action


Project Name: rail-berkeley/softlearning
Commit Name: bdd1a023482b34aa9980c64b434ce75824e16543
Time: 2018-05-22
Author: kristian.hartikainen@gmail.com
File Name: sac/policies/gmm.py
Class Name: GMMPolicy
Method Name: get_action


Project Name: rail-berkeley/softlearning
Commit Name: 5d97c32fba6dab5ff8009bf350a4209f3ea5684d
Time: 2018-05-22
Author: kristian.hartikainen@gmail.com
File Name: sac/policies/gmm.py
Class Name: GMMPolicy
Method Name: get_actions