b5ae1c6bde39f5130c975992198f1f8ee5200f9a,tf_agents/policies/q_policy_test.py,QPolicyTest,testActionWithinBounds,#QPolicyTest#,102
Before Change
policy = q_policy.QPolicy(
self._time_step_spec, bounded_action_spec, q_network=DummyNet())
observations = tf.constant([[1, 2], [3, 4]], dtype=tf.float32)
time_step = ts.restart(observations, batch_size=2)
action_step = policy.action(time_step)
self.assertEqual(action_step.action.shape.as_list(), [2, 1])
self.assertEqual(action_step.action.dtype, tf.int32)
// Initialize all variables
self.evaluate(tf.compat.v1.global_variables_initializer())
After Change
minimum=-6,
maximum=-5)
with self.assertRaisesRegex(ValueError, "minimum of 0"):
q_policy.QPolicy(
self._time_step_spec, bounded_action_spec, q_network=DummyNet())
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tensorflow/agents
Commit Name: b5ae1c6bde39f5130c975992198f1f8ee5200f9a
Time: 2020-06-22
Author: ebrevdo@google.com
File Name: tf_agents/policies/q_policy_test.py
Class Name: QPolicyTest
Method Name: testActionWithinBounds
Project Name: mortendahl/tf-encrypted
Commit Name: e086b02bf4d19fbdcc751bfa876d03f2fcdaf375
Time: 2019-01-10
Author: mortendahlcs@gmail.com
File Name: tf_encrypted/tensor/int32.py
Class Name: Int32Constant
Method Name: __init__
Project Name: mortendahl/tf-encrypted
Commit Name: e086b02bf4d19fbdcc751bfa876d03f2fcdaf375
Time: 2019-01-10
Author: mortendahlcs@gmail.com
File Name: tf_encrypted/tensor/prime.py
Class Name: PrimeConstant
Method Name: __init__