diff --git a/14_recurrent_neural_networks.ipynb b/14_recurrent_neural_networks.ipynb index f4d541c..8ef2261 100644 --- a/14_recurrent_neural_networks.ipynb +++ b/14_recurrent_neural_networks.ipynb @@ -1517,7 +1517,7 @@ }, "outputs": [], "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": [ "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)}))" ] }, { @@ -2372,7 +2372,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"