Replace rnd by np.random in notebook 14

main
Aurélien Geron 2017-08-16 10:44:18 +02:00
parent a65ab3b154
commit 95b91de6a6
1 changed files with 3 additions and 3 deletions

View File

@ -1517,7 +1517,7 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"X_batch = rnd.rand(2, n_steps, n_inputs)" "X_batch = np.random.rand(2, n_steps, n_inputs)"
] ]
}, },
{ {
@ -1687,7 +1687,7 @@
"source": [ "source": [
"with tf.Session() as sess:\n", "with tf.Session() as sess:\n",
" init.run()\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)}))"
] ]
}, },
{ {
@ -2372,7 +2372,7 @@
"# construction are also the most frequent.\n", "# construction are also the most frequent.\n",
"valid_size = 16 # Random set of words to evaluate similarity on.\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_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", "num_sampled = 64 # Number of negative examples to sample.\n",
"\n", "\n",
"learning_rate = 0.01" "learning_rate = 0.01"