(B=12, learning_rate=1e-4, epochs=200)
| 97 | |
| 98 | |
| 99 | def 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 | |
| 107 | if __name__ == '__main__': |
no test coverage detected