b208fa6cf8bde0ed8a315eef6656271a77ce9d83,texar/agents/dqn_agent.py,DQNAgent,get_action,#DQNAgent#Any#Any#,153

Before Change


                if action_mask[action_id]:
                    break
        else:
            for i in range(self.actions):
                if not action_mask[i]:
                    qvalue[i] -= 10.0 ** 9
            action_id = np.argmax(qvalue)
        action[action_id] = 1.0

        return action

After Change


        qvalue = self._sess.run(
            self._qnet_outputs["qvalues"],
            feed_dict={self._observ_inputs: np.array([observ]),
                       tx.global_mode(): tf.estimator.ModeKeys.PREDICT})

        action = np.zeros(shape=self._num_actions)
        if random.random() < self._exploration.get_epsilon(self.timestep):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: asyml/texar
Commit Name: b208fa6cf8bde0ed8a315eef6656271a77ce9d83
Time: 2018-07-29
Author: tanbowen@sjtu.edu.cn
File Name: texar/agents/dqn_agent.py
Class Name: DQNAgent
Method Name: get_action


Project Name: evilsocket/pwnagotchi
Commit Name: 1f99a249c63b09152b89bdd5eb354b1d2c795391
Time: 2019-10-07
Author: 33197631+dadav@users.noreply.github.com
File Name: pwnagotchi/plugins/default/grid.py
Class Name:
Method Name: parse_pcap


Project Name: dmlc/gluon-nlp
Commit Name: 70a188776f7470c838dd22b1636462b75573a734
Time: 2020-07-16
Author: lausen@amazon.com
File Name: src/gluonnlp/models/roberta.py
Class Name: RobertaEncoder
Method Name: __init__


Project Name: streamlit/streamlit
Commit Name: 969cbff0ee308f153b41c5df137b4215907857e3
Time: 2020-02-11
Author: rhone.j@gmail.com
File Name: lib/streamlit/hashing.py
Class Name: CodeHasher
Method Name: _to_bytes