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

Function parity

rnn_class/srn_parity_tf.py:99–104  ·  view source on GitHub ↗
(B=12, learning_rate=1e-4, epochs=200)

Source from the content-addressed store, hash-verified

97
98
99def parity(B=12, learning_rate=1e-4, epochs=200):
100 X, Y = all_parity_pairs_with_sequence_labels(B)
101 X = X.astype(np.float32)
102
103 rnn = SimpleRNN(20)
104 rnn.fit(X, Y, learning_rate=learning_rate, epochs=epochs, activation=tf.nn.relu, show_fig=False)
105
106
107if __name__ == '__main__':

Callers 1

srn_parity_tf.pyFile · 0.70

Calls 3

fitMethod · 0.95
SimpleRNNClass · 0.70

Tested by

no test coverage detected