00748b6ec7a3e845cbfe9319664e357418c0ca73,thinc/tests/layers/test_lstm.py,,test_LSTM_fwd_bwd_shapes,#Any#Any#,64
Before Change
def test_LSTM_fwd_bwd_shapes(nO, nI):
nO = 1
nI = 2
model = with_padded(LSTM(nO, nI))
X = numpy.asarray([[0.1, 0.1], [-0.1, -0.1], [1.0, 1.0]], dtype="f")
ys, backprop_ys = model([X], is_train=False)
dXs = backprop_ys(ys)
After Change
nO = 1
nI = 2
X = numpy.asarray([[0.1, 0.1], [-0.1, -0.1], [1.0, 1.0]], dtype="f")
model = with_padded(LSTM(nO, nI)).initialize(X=X)
ys, backprop_ys = model([X], is_train=False)
dXs = backprop_ys(ys)
assert numpy.vstack(dXs).shape == numpy.vstack([X]).shape
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 3
Instances
Project Name: explosion/thinc
Commit Name: 00748b6ec7a3e845cbfe9319664e357418c0ca73
Time: 2020-01-19
Author: ines@ines.io
File Name: thinc/tests/layers/test_lstm.py
Class Name:
Method Name: test_LSTM_fwd_bwd_shapes
Project Name: explosion/thinc
Commit Name: 00748b6ec7a3e845cbfe9319664e357418c0ca73
Time: 2020-01-19
Author: ines@ines.io
File Name: thinc/tests/layers/test_lstm.py
Class Name:
Method Name: test_benchmark_LSTM_fwd
Project Name: explosion/thinc
Commit Name: 00748b6ec7a3e845cbfe9319664e357418c0ca73
Time: 2020-01-19
Author: ines@ines.io
File Name: thinc/tests/layers/test_lstm.py
Class Name:
Method Name: test_lstm_init
Project Name: explosion/thinc
Commit Name: 00748b6ec7a3e845cbfe9319664e357418c0ca73
Time: 2020-01-19
Author: ines@ines.io
File Name: thinc/tests/layers/test_lstm.py
Class Name:
Method Name: test_LSTM_learns
Project Name: explosion/thinc
Commit Name: 00748b6ec7a3e845cbfe9319664e357418c0ca73
Time: 2020-01-19
Author: ines@ines.io
File Name: thinc/tests/layers/test_lstm.py
Class Name:
Method Name: test_LSTM_init_with_sizes
Project Name: explosion/thinc
Commit Name: 00748b6ec7a3e845cbfe9319664e357418c0ca73
Time: 2020-01-19
Author: ines@ines.io
File Name: thinc/tests/layers/test_lstm.py
Class Name:
Method Name: test_pytorch_lstm_init