Getting ready
In this chapter, we will introduce keras
and tensorflow
for R. keras
 is a model-level building, in that it provides a high-level interface to quickly develop deep learning models. Instead of implementing low-level operations such as convolutions and tensor products, it relies on Theano, TensorFlow or CNTK in the backend, and according to the development team, more backends would be supported in the future.Â
Why do you need a backend? Well, if the computation becomes more complicated, which is often the case in deep learning, you need to use different computation methods (known as computation graphs) and hardware (GPUs). For instructional purposes, all our sample codes run without GPU.Â
Installing Keras and TensorFlow for R
As per the official documentation, you can install Keras simply with:
devtools::install_github("rstudio/keras")
The Keras R interface uses tensorflow
as a backendengine by default. To install both the core keras
library and tensorflow
, then do:
library(keras) install_keras...