January 2018
Intermediate to advanced
474 pages
10h 23m
English
We learned about the TensorFlow core API in Chapter 1. In R, this API is implemented with the tensorflow R package.
As an example, we provide a walkthrough of the MLP Model for classifying handwritten digits from the MNIST dataset at the following link: https://tensorflow.rstudio.com/tensorflow/articles/examples/mnist_softmax.html.
library(tensorflow)
batch_size <- 128num_classes <- 10steps <- 1000
datasets <- tf$contrib$learn$datasetsmnist <- datasets$mnist$read_data_sets("MNIST-data", one_hot = TRUE)
The data is loaded from the TensorFlow dataset library and is already ...
Read now
Unlock full access