8248caf35eeb43046f2b28937627d43cbf950c9a,agents/imitation_agent.py,ImitationAgent,choose_action,#ImitationAgent#Any#Any#,32

Before Change



    def choose_action(self, curr_state, phase=RunPhase.TRAIN):
        // convert to batch so we can run it through the network
        observation = np.expand_dims(np.array(curr_state["observation"]), 0)
        if self.tp.agent.use_measurements:
            measurements = np.expand_dims(np.array(curr_state["measurements"]), 0)
            prediction = self.main_network.online_network.predict([observation, measurements])
        else:

After Change



    def choose_action(self, curr_state, phase=RunPhase.TRAIN):
        // convert to batch so we can run it through the network
        prediction = self.main_network.online_network.predict(self.tf_input_state(curr_state))

        // get action values and extract the best action from it
        action_values = self.extract_action_values(prediction)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


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/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: 8248caf35eeb43046f2b28937627d43cbf950c9a
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: agents/naf_agent.py
Class Name: NAFAgent
Method Name: choose_action