98f57a0d8781083cbca137fb9d84313b94d9d108,agents/ddpg_agent.py,DDPGAgent,choose_action,#DDPGAgent#Any#Any#,84

Before Change


    def choose_action(self, curr_state, phase=RunPhase.TRAIN):
        assert not self.env.discrete_controls, "DDPG works only for continuous control problems"
        // convert to batch so we can run it through the network
        observation = np.expand_dims(np.array(curr_state["observation"]), 0)
        result = self.actor_network.online_network.predict(observation)
        action_values = result[0].squeeze()

        if phase == RunPhase.TRAIN:

After Change



    def choose_action(self, curr_state, phase=RunPhase.TRAIN):
        assert not self.env.discrete_controls, "DDPG works only for continuous control problems"
        result = self.actor_network.online_network.predict(self.tf_input_state(curr_state))
        action_values = result[0].squeeze()

        if phase == RunPhase.TRAIN:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: NervanaSystems/coach
Commit Name: 98f57a0d8781083cbca137fb9d84313b94d9d108
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: agents/ddpg_agent.py
Class Name: DDPGAgent
Method Name: choose_action


Project Name: NervanaSystems/coach
Commit Name: 8248caf35eeb43046f2b28937627d43cbf950c9a
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: agents/policy_gradients_agent.py
Class Name: PolicyGradientsAgent
Method Name: choose_action


Project Name: NervanaSystems/coach
Commit Name: 8248caf35eeb43046f2b28937627d43cbf950c9a
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: agents/imitation_agent.py
Class Name: ImitationAgent
Method Name: choose_action


Project Name: NervanaSystems/coach
Commit Name: 98f57a0d8781083cbca137fb9d84313b94d9d108
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: agents/ddpg_agent.py
Class Name: DDPGAgent
Method Name: choose_action


Project Name: NervanaSystems/coach
Commit Name: 8248caf35eeb43046f2b28937627d43cbf950c9a
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: agents/naf_agent.py
Class Name: NAFAgent
Method Name: choose_action