Skip to content

Commit

Permalink
Replace rnd by np.random in notebook 14
Browse files Browse the repository at this point in the history
  • Loading branch information
ageron committed Aug 16, 2017
1 parent a877054 commit 78e95d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 14_recurrent_neural_networks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@
},
"outputs": [],
"source": [
"X_batch = rnd.rand(2, n_steps, n_inputs)"
"X_batch = np.random.rand(2, n_steps, n_inputs)"
]
},
{
Expand Down Expand Up @@ -2270,7 +2270,7 @@
"source": [
"with tf.Session() as sess:\n",
" init.run()\n",
" print(sess.run(outputs, feed_dict={X: rnd.rand(2, n_steps, n_inputs)}))"
" print(sess.run(outputs, feed_dict={X: np.random.rand(2, n_steps, n_inputs)}))"
]
},
{
Expand Down Expand Up @@ -3124,7 +3124,7 @@
"# construction are also the most frequent.\n",
"valid_size = 16 # Random set of words to evaluate similarity on.\n",
"valid_window = 100 # Only pick dev samples in the head of the distribution.\n",
"valid_examples = rnd.choice(valid_window, valid_size, replace=False)\n",
"valid_examples = np.random.choice(valid_window, valid_size, replace=False)\n",
"num_sampled = 64 # Number of negative examples to sample.\n",
"\n",
"learning_rate = 0.01"
Expand Down

0 comments on commit 78e95d1

Please sign in to comment.