e4b6611cb73ef7658f028831be1aa6bd85ecbed0,src/garage/tf/policies/categorical_mlp_policy.py,CategoricalMLPPolicy,get_action,#CategoricalMLPPolicy#Any#,116
Before Change
sample, prob = self._f_prob(np.expand_dims([observation], 1))
return np.squeeze(sample[0]), dict(prob=np.squeeze(prob, axis=1)[0])
def get_actions(self, observations):
Return multiple actions.
After Change
dict(numpy.ndarray): Distribution parameters.
actions, agent_infos = self.get_actions([observation])
return actions, {k: v[0] for k, v in agent_infos.items()}
def get_actions(self, observations):
Return multiple actions.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: rlworkgroup/garage
Commit Name: e4b6611cb73ef7658f028831be1aa6bd85ecbed0
Time: 2020-08-14
Author: 38871737+avnishn@users.noreply.github.com
File Name: src/garage/tf/policies/categorical_mlp_policy.py
Class Name: CategoricalMLPPolicy
Method Name: get_action
Project Name: rlworkgroup/garage
Commit Name: e4b6611cb73ef7658f028831be1aa6bd85ecbed0
Time: 2020-08-14
Author: 38871737+avnishn@users.noreply.github.com
File Name: src/garage/tf/policies/gaussian_mlp_policy.py
Class Name: GaussianMLPPolicy
Method Name: get_action
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