Esempio n. 1
0
def test_fdsrnn_lstm_fit():
    X = np.random.standard_normal((13, 5, 4)).astype(theano.config.floatX)
    Z = np.random.standard_normal((13, 5, 3)).astype(theano.config.floatX)
    W = np.random.standard_normal((13, 5, 3)).astype(theano.config.floatX)

    X, Z, W = theano_floatx(X, Z, W)

    rnn = SupervisedFastDropoutRnn(4, [10], 3, hidden_transfers=['lstm'],
                                   max_iter=2)
    rnn.mode = 'FAST_COMPILE'
    rnn.fit(X, Z)
Esempio n. 2
0
def test_fdsrnn_lstm_fit():
    X = np.random.standard_normal((13, 5, 4)).astype(theano.config.floatX)
    Z = np.random.standard_normal((13, 5, 3)).astype(theano.config.floatX)
    W = np.random.standard_normal((13, 5, 3)).astype(theano.config.floatX)

    X, Z, W = theano_floatx(X, Z, W)

    rnn = SupervisedFastDropoutRnn(4, [10],
                                   3,
                                   hidden_transfers=['lstm'],
                                   max_iter=2)
    rnn.mode = 'FAST_COMPILE'
    rnn.fit(X, Z)