Replace rnd by np.random in notebook 14
parent
a65ab3b154
commit
95b91de6a6
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue