Skip to content

Commit 120c858

Browse files
committed
Some musings on data for the neural network lesson
1 parent 79eaa52 commit 120c858

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

0XX-neural-networks.qmd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,15 @@ https://www.rpubs.com/sedzinfo/keras_mnist
243243
The keras package includes a getting started vignette at
244244
https://cran.r-project.org/web/packages/keras/vignettes/index.html
245245

246-
246+
For dealing with the data, we can see the gist at
247+
https://gist.github.com/brendano/39760
248+
This opens a binary file (the extracted .gz file that ends in -ubyte) and reads
249+
it into memory. Image data are called x (MNIST) and training (FMNIST), while
250+
label data are called y (MNIST) and label (FMNIST).
251+
252+
For our purposes, consider reducing the dataset to 10%. Could even have a
253+
"bonus track" section to do download of file, R.utils::gunzip to extract the
254+
gz file, then read in the file with readBin.
247255

248256
```{r first-mnist}
249257
mnist_train <- read.csv(file = "~/Desktop/mnist_train.csv", header = FALSE)

0 commit comments

Comments
 (0)