f7c759ca562303127a9991574d5a985d4dff99e8,sonnet/python/modules/basic_rnn_test.py,ModelRNNTest,testComputation,#ModelRNNTest#,663

Before Change



    outputs, next_state = model_rnn(inputs, prev_state)

    with self.test_session() as sess:
      prev_state_data = np.random.randn(self.batch_size, self.hidden_size)
      feed_dict = {prev_state: prev_state_data}
      sess.run(tf.global_variables_initializer())

      outputs_value = sess.run([outputs, next_state], feed_dict=feed_dict)
      outputs_value, next_state_value = outputs_value

    self.assertAllClose(prev_state_data, outputs_value)
    self.assertAllClose(outputs_value, next_state_value)

  def testBadArguments(self):

After Change


    model_rnn = snt.ModelRNN(self.model)
    inputs = tf.random_normal([self.batch_size, 5])
    prev_state_data = np.random.randn(self.batch_size, self.hidden_size)
    prev_state = tf.convert_to_tensor(prev_state_data)

    outputs, next_state = model_rnn(inputs, prev_state)

    self.evaluate(tf.global_variables_initializer())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: deepmind/sonnet
Commit Name: f7c759ca562303127a9991574d5a985d4dff99e8
Time: 2018-07-17
Author: tomhennigan@google.com
File Name: sonnet/python/modules/basic_rnn_test.py
Class Name: ModelRNNTest
Method Name: testComputation


Project Name: tensorflow/agents
Commit Name: 14c08e3da6965eccee804f53ecdf8ecd0c1656f2
Time: 2019-02-04
Author: oars@google.com
File Name: tf_agents/utils/nest_utils_test.py
Class Name: NestedTensorsTest
Method Name: testGetOuterShapeDynamicShapeNotBatched


Project Name: deepmind/sonnet
Commit Name: f7c759ca562303127a9991574d5a985d4dff99e8
Time: 2018-07-17
Author: tomhennigan@google.com
File Name: sonnet/python/modules/basic_rnn_test.py
Class Name: VanillaRNNTest
Method Name: testComputation


Project Name: tensorflow/agents
Commit Name: 14c08e3da6965eccee804f53ecdf8ecd0c1656f2
Time: 2019-02-04
Author: oars@google.com
File Name: tf_agents/utils/nest_utils_test.py
Class Name: NestedTensorsTest
Method Name: testGetOuterShapeDynamicShapeBatched