d9ef1ee4303a0862a3a127bfea954f06811b06ba,tf_agents/policies/q_policy_test.py,QPolicyTest,testUpdate,#QPolicyTest#,156

Before Change


    self.evaluate(tf.compat.v1.global_variables_initializer())
    self.assertEqual(self.evaluate(new_policy.update(policy)), None)

    self.assertAllEqual(self.evaluate(action_step.action), [[1], [1]])
    self.assertAllEqual(self.evaluate(new_action_step.action), [[1], [1]])

  def testActionSpecsCompatible(self):
    q_network = DummyNetWithActionSpec(self._action_spec)

After Change


    self.evaluate(tf.compat.v1.global_variables_initializer())
    self.assertEqual(self.evaluate(new_policy.update(policy)), None)

    action = self.evaluate(action_step.action)
    new_action = self.evaluate(new_action_step.action)
    self.assertTrue(np.all(action >= 0) and np.all(action <= 1))
    self.assertTrue(np.all(new_action >= 0) and np.all(new_action <= 1))
    self.assertAllEqual(action, new_action)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 13

Non-data size: 3

Instances


Project Name: tensorflow/agents
Commit Name: d9ef1ee4303a0862a3a127bfea954f06811b06ba
Time: 2019-08-07
Author: wun@google.com
File Name: tf_agents/policies/q_policy_test.py
Class Name: QPolicyTest
Method Name: testUpdate


Project Name: tensorflow/agents
Commit Name: d9ef1ee4303a0862a3a127bfea954f06811b06ba
Time: 2019-08-07
Author: wun@google.com
File Name: tf_agents/policies/q_policy_test.py
Class Name: QPolicyTest
Method Name: testAction


Project Name: tensorflow/agents
Commit Name: 9a3e9d21273da7ae40da9f70cb6df1b077b08105
Time: 2019-12-05
Author: kbanoop@google.com
File Name: tf_agents/networks/actor_distribution_network_test.py
Class Name: ActorDistributionNetworkTest
Method Name: testDropoutFCLayersWithConv


Project Name: tensorflow/agents
Commit Name: 230503ac56636d91d53d728c247c6ea3d096eeb9
Time: 2018-11-30
Author: sguada@google.com
File Name: tf_agents/environments/tf_py_environment_test.py
Class Name: TFPYEnvironmentTest
Method Name: testOneStep


Project Name: tensorflow/agents
Commit Name: 71ec57f993d28f83bea04953cc51365942cb4894
Time: 2020-02-07
Author: summeryue@google.com
File Name: tf_agents/agents/behavioral_cloning/behavioral_cloning_agent_test.py
Class Name: BehavioralCloningAgentTest
Method Name: testTrainWithNN


Project Name: tensorflow/agents
Commit Name: 71ec57f993d28f83bea04953cc51365942cb4894
Time: 2020-02-07
Author: summeryue@google.com
File Name: tf_agents/agents/behavioral_cloning/behavioral_cloning_agent_test.py
Class Name: BehavioralCloningAgentTest
Method Name: testTrainWithRNN


Project Name: tensorflow/agents
Commit Name: d9ef1ee4303a0862a3a127bfea954f06811b06ba
Time: 2019-08-07
Author: wun@google.com
File Name: tf_agents/policies/q_policy_test.py
Class Name: QPolicyTest
Method Name: testActionList


Project Name: deepchem/deepchem
Commit Name: 15c0c7ed0a4cdeeab0e59208c047318b7b0bbdf8
Time: 2017-06-14
Author: Karl
File Name: deepchem/models/tests/test_reload.py
Class Name: TestReload
Method Name: test_tf_reload


Project Name: scipy/scipy
Commit Name: af8957818f8a6ff4784c69fd280b59b40efc592a
Time: 2012-01-03
Author: ralf.gommers@googlemail.com
File Name: scipy/stats/tests/test_kdeoth.py
Class Name:
Method Name: test_kde_bandwidth_method


Project Name: OpenNMT/OpenNMT-tf
Commit Name: 4fd8961026fdab7e17817083b96f59157bd0ca09
Time: 2019-03-27
Author: guillaume.klein@systrangroup.com
File Name: opennmt/tests/encoder_test.py
Class Name: EncoderTest
Method Name: testRNMTPlusEncoder


Project Name: tensorflow/agents
Commit Name: d9ef1ee4303a0862a3a127bfea954f06811b06ba
Time: 2019-08-07
Author: wun@google.com
File Name: tf_agents/policies/q_policy_test.py
Class Name: QPolicyTest
Method Name: testActionScalarSpec


Project Name: CyberZHG/keras-bert
Commit Name: f1777bbb9e44de6ca0a669e31e07edd601968364
Time: 2019-09-17
Author: 853842+CyberZHG@users.noreply.github.com
File Name: tests/layers/test_masked.py
Class Name: TestMasked
Method Name: test_mask_loss


Project Name: tensorflow/agents
Commit Name: 2399bacca070189e2f89c6a6e1dbf72239d8129f
Time: 2020-04-13
Author: oars@google.com
File Name: tf_agents/policies/policy_saver_test.py
Class Name: PolicySaverTest
Method Name: testTrainStepSaved