This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| # Default value of forget_bias is already 1.0 | |
| cell = tf.nn.rnn_cell.LSTMCell(self.num_hidden, forget_bias=1.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| cell = tf.nn.rnn_cell.GRUCell(self.num_hidden) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from tensorflow.contrib import rnn | |
| cell_fw = tf.nn.rnn_cell.LSTMCell(self.num_hidden) | |
| cell_bw = tf.nn.rnn_cell.LSTMCell(self.num_hidden) | |
| outputs, states = rnn.static_bidirectional_rnn(cell_fw, cell_bw, x, dtype=tf.float32) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| cell = tf.nn.rnn_cell.LSTMCell(self.num_hidden, use_peepholes=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from tensorflow.contrib import rnn | |
| cell_fw = rnn.BasicRNNCell(self.num_hidden) | |
| cell_bw = rnn.BasicRNNCell(self.num_hidden) | |
| outputs, states = rnn.static_bidirectional_rnn(cell_fw, cell_bw, x, dtype=tf.float32) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| cell = tf.nn.rnn_cell.LSTMCell(self.num_hidden) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from tensorflow.contrib import rnn | |
| cell = rnn.BasicRNNCell(self.num_hidden) |