Skip to content

Commit 23a14dd

Browse files
rossbarmelissawm
authored andcommitted
Only apply one-hot encoding to subsets.
1 parent 71e149b commit 23a14dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/tutorial-deep-learning-on-mnist.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ def one_hot_encoding(labels, dimension=10):
263263
**3.** Encode the labels and assign the values to new variables:
264264

265265
```{code-cell} ipython3
266-
training_labels = one_hot_encoding(y_train)
267-
test_labels = one_hot_encoding(y_test)
266+
training_labels = one_hot_encoding(y_train[:training_sample])
267+
test_labels = one_hot_encoding(y_test[:test_sample])
268268
```
269269

270270
**4.** Check that the data type has changed to floating point:

0 commit comments

Comments
 (0)