MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / lstm2

Function lstm2

nlp_class3/simple_rnn_test.py:41–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40
41def lstm2():
42 input_ = Input(shape=(T, D))
43 rnn = LSTM(M, return_state=True, return_sequences=True)
44 # rnn = GRU(M, return_state=True)
45 x = rnn(input_)
46
47 model = Model(inputs=input_, outputs=x)
48 o, h, c = model.predict(X)
49 print("o:", o)
50 print("h:", h)
51 print("c:", c)
52
53
54def gru1():

Callers 1

simple_rnn_test.pyFile · 0.85

Calls 3

predictMethod · 0.95
LSTMClass · 0.50
ModelClass · 0.50

Tested by

no test coverage detected