f7c759ca562303127a9991574d5a985d4dff99e8,sonnet/python/modules/gated_rnn_test.py,LSTMTest,testCellClipping,#LSTMTest#,686
Before Change
def testCellClipping(self):
core = snt.LSTM(hidden_size=5, cell_clip_value=1.0)
obs = tf.constant(np.random.rand(3, 10), dtype=tf.float32)
hidden = tf.placeholder(tf.float32, shape=[3, 5])
cell = tf.placeholder(tf.float32, shape=[3, 5])
output = core(obs, [hidden, cell])
with self.test_session() as sess:
sess.run(tf.global_variables_initializer())
unclipped = np.random.rand(3, 5) - 0.5
After Change
self.evaluate(tf.global_variables_initializer())
output1, (hidden1, cell1) = self.evaluate(output)
cell = tf.constant(clipped)
output = core(obs, [hidden, cell])
output2, (hidden2, cell2) = self.evaluate(output)
self.assertAllClose(output1, output2)
self.assertAllClose(hidden1, hidden2)
self.assertAllClose(cell1, cell2)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: deepmind/sonnet
Commit Name: f7c759ca562303127a9991574d5a985d4dff99e8
Time: 2018-07-17
Author: tomhennigan@google.com
File Name: sonnet/python/modules/gated_rnn_test.py
Class Name: LSTMTest
Method Name: testCellClipping
Project Name: deepmind/sonnet
Commit Name: f7c759ca562303127a9991574d5a985d4dff99e8
Time: 2018-07-17
Author: tomhennigan@google.com
File Name: sonnet/python/modules/gated_rnn_test.py
Class Name: LSTMTest
Method Name: testHiddenClipping
Project Name: GPflow/GPflow
Commit Name: cc5e7d00a6696a8cf6e40686455e7e034fbf26ff
Time: 2017-09-28
Author: art.art.v@gmail.com
File Name: testing/test_kerns.py
Class Name: TestProd
Method Name: setUp
Project Name: deepmind/sonnet
Commit Name: f7c759ca562303127a9991574d5a985d4dff99e8
Time: 2018-07-17
Author: tomhennigan@google.com
File Name: sonnet/python/modules/gated_rnn_test.py
Class Name: LSTMTest
Method Name: testCellClipping