Skip to content

Commit 1f58605

Browse files
SimsGautamaymericdamien
authored andcommitted
fixed shape errors in the rnn model comments (aymericdamien#43)
1 parent f8dba4c commit 1f58605

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

examples/3_NeuralNetworks/bidirectional_rnn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def BiRNN(x, weights, biases):
5353

5454
# Prepare data shape to match `bidirectional_rnn` function requirements
5555
# Current data input shape: (batch_size, n_steps, n_input)
56-
# Required shape: 'n_steps' tensors list of shape (batch_size, n_hidden)
56+
# Required shape: 'n_steps' tensors list of shape (batch_size, n_input)
5757

5858
# Permuting batch_size and n_steps
5959
x = tf.transpose(x, [1, 0, 2])
6060
# Reshape to (n_steps*batch_size, n_input)
6161
x = tf.reshape(x, [-1, n_input])
62-
# Split to get a list of 'n_steps' tensors of shape (batch_size, n_hidden)
62+
# Split to get a list of 'n_steps' tensors of shape (batch_size, n_input)
6363
x = tf.split(0, n_steps, x)
6464

6565
# Define lstm cells with tensorflow

examples/3_NeuralNetworks/recurrent_network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ def RNN(x, weights, biases):
5050

5151
# Prepare data shape to match `rnn` function requirements
5252
# Current data input shape: (batch_size, n_steps, n_input)
53-
# Required shape: 'n_steps' tensors list of shape (batch_size, n_hidden)
53+
# Required shape: 'n_steps' tensors list of shape (batch_size, n_input)
5454

5555
# Permuting batch_size and n_steps
5656
x = tf.transpose(x, [1, 0, 2])
5757
# Reshaping to (n_steps*batch_size, n_input)
5858
x = tf.reshape(x, [-1, n_input])
59-
# Split to get a list of 'n_steps' tensors of shape (batch_size, n_hidden)
59+
# Split to get a list of 'n_steps' tensors of shape (batch_size, n_input)
6060
x = tf.split(0, n_steps, x)
6161

6262
# Define a lstm cell with tensorflow

notebooks/3_NeuralNetworks/bidirectional_rnn.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@
9999
"\n",
100100
" # Prepare data shape to match `bidirectional_rnn` function requirements\n",
101101
" # Current data input shape: (batch_size, n_steps, n_input)\n",
102-
" # Required shape: 'n_steps' tensors list of shape (batch_size, n_hidden)\n",
102+
" # Required shape: 'n_steps' tensors list of shape (batch_size, n_input)\n",
103103
" \n",
104104
" # Permuting batch_size and n_steps\n",
105105
" x = tf.transpose(x, [1, 0, 2])\n",
106106
" # Reshape to (n_steps*batch_size, n_input)\n",
107107
" x = tf.reshape(x, [-1, n_input])\n",
108-
" # Split to get a list of 'n_steps' tensors of shape (batch_size, n_hidden)\n",
108+
" # Split to get a list of 'n_steps' tensors of shape (batch_size, n_input)\n",
109109
" x = tf.split(0, n_steps, x)\n",
110110
"\n",
111111
" # Define lstm cells with tensorflow\n",

notebooks/3_NeuralNetworks/recurrent_network.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@
9696
"\n",
9797
" # Prepare data shape to match `rnn` function requirements\n",
9898
" # Current data input shape: (batch_size, n_steps, n_input)\n",
99-
" # Required shape: 'n_steps' tensors list of shape (batch_size, n_hidden)\n",
99+
" # Required shape: 'n_steps' tensors list of shape (batch_size, n_input)\n",
100100
" \n",
101101
" # Permuting batch_size and n_steps\n",
102102
" x = tf.transpose(x, [1, 0, 2])\n",
103103
" # Reshaping to (n_steps*batch_size, n_input)\n",
104104
" x = tf.reshape(x, [-1, n_input])\n",
105-
" # Split to get a list of 'n_steps' tensors of shape (batch_size, n_hidden)\n",
105+
" # Split to get a list of 'n_steps' tensors of shape (batch_size, n_input)\n",
106106
" x = tf.split(0, n_steps, x)\n",
107107
"\n",
108108
" # Define a lstm cell with tensorflow\n",

0 commit comments

Comments
 (0)