Skip to content

Commit f97c56b

Browse files
committed
update lstmcell code
1 parent 0468d25 commit f97c56b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎tutorial-contents/402_RNN_classification.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
tf_y = tf.placeholder(tf.int32, [None, 10]) # input y
4040

4141
# RNN
42-
rnn_cell = tf.contrib.rnn.BasicLSTMCell(num_units=64)
42+
rnn_cell = tf.nn.rnn_cell.LSTMCell(num_units=64)
4343
outputs, (h_c, h_n) = tf.nn.dynamic_rnn(
4444
rnn_cell, # cell you have chosen
4545
image, # input

‎tutorial-contents/403_RNN_regression.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
tf_y = tf.placeholder(tf.float32, [None, TIME_STEP, INPUT_SIZE]) # input y
3030

3131
# RNN
32-
rnn_cell = tf.contrib.rnn.BasicRNNCell(num_units=CELL_SIZE)
32+
rnn_cell = tf.nn.rnn_cell.LSTMCell(num_units=CELL_SIZE)
3333
init_s = rnn_cell.zero_state(batch_size=1, dtype=tf.float32) # very first hidden state
3434
outputs, final_s = tf.nn.dynamic_rnn(
3535
rnn_cell, # cell you have chosen

0 commit comments

Comments
 (0)