def test_slstm_iter_fit(): X = np.random.standard_normal((10, 5, 2)).astype(theano.config.floatX) Z = np.random.standard_normal((10, 5, 3)).astype(theano.config.floatX) X, Z = theano_floatx(X, Z) rnn = SupervisedLstmRnn(2, [10], 3, hidden_transfers=['sigmoid'], max_iter=10) for i, info in enumerate(rnn.iter_fit(X, Z)): if i >= 10: break
def test_slstm_predict(): X = np.random.standard_normal((10, 5, 2)).astype(theano.config.floatX) X, = theano_floatx(X) rnn = SupervisedLstmRnn(2, [10], 3, hidden_transfers=['sigmoid'], max_iter=10) rnn.predict(X)
def test_slstm(): X = np.random.standard_normal((10, 5, 2)).astype(theano.config.floatX) Z = np.random.standard_normal((10, 5, 3)).astype(theano.config.floatX) X, Z = theano_floatx(X, Z) rnn = SupervisedLstmRnn(2, [10], 3, hidden_transfers=["sigmoid"], max_iter=10) rnn.fit(X, Z)