8426825800af370988e50f5105ffce53f384de91,tf_agents/policies/random_tf_policy_test.py,RandomTFPolicyTest,testInfoSpec,#RandomTFPolicyTest#Any#,188
Before Change
tf.constant(np.log(1. / 3), shape=[batch_size]))
def testInfoSpec(self, dtype):
PolicyInfo = collections.namedtuple( // pylint: disable=invalid-name
"PolicyInfo",
("log_probability", "predicted_rewards"))
// Set default empty tuple for all fields.
PolicyInfo.__new__.__defaults__ = ((),) * len(PolicyInfo._fields)
action_spec = [
After Change
tf.nest.assert_same_structure(action_spec, batched_action_step.action)
self.assertEqual((batch_size, 2, 3,), batched_action_step.action[0].shape)
self.assertEqual((batch_size, 1, 2,), batched_action_step.action[1].shape)
tf.nest.assert_same_structure(info_spec, batched_action_step.info)
self.assertEqual((batch_size, 1,), batched_action_step.info[0].shape)
self.assertEqual((batch_size, 1,), batched_action_step.info[1].shape)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: tensorflow/agents
Commit Name: 8426825800af370988e50f5105ffce53f384de91
Time: 2019-11-21
Author: no-reply@google.com
File Name: tf_agents/policies/random_tf_policy_test.py
Class Name: RandomTFPolicyTest
Method Name: testInfoSpec
Project Name: probcomp/bayeslite
Commit Name: f2a20e32634d1a72fd9a86030bfedf4117ff4896
Time: 2015-10-28
Author: riastradh+probcomp@csail.mit.edu
File Name: tests/test_sessions.py
Class Name:
Method Name: get_entries
Project Name: tensorflow/agents
Commit Name: fe3101f5a5b02e9e7b4ddb260cda15b05cfb6dd7
Time: 2019-11-19
Author: no-reply@google.com
File Name: tf_agents/policies/random_tf_policy_test.py
Class Name: RandomTFPolicyTest
Method Name: testInfoSpec