We will use Keras R API to define and manipulate deep learning models.

Keras

Keras is a model-level library

Backend engines

CPU and GPU

Deep Learning and GPUs

Installing Keras

The steps below should be done only once within R console:

install.packages("keras") # Install R package Keras
library(keras)            # Load R package Keras
install_keras()           # Install Keras and dependencies

If you are running on a system with an NVIDIA GPU and properly configured CUDA and cuDNN libraries, you can install the GPU-based version of the TensorFlow backend engine as follows:

install_keras(tensorflow = "gpu")

Note: You do not need GPU to follow the lectures.

Typical Keras workflow

Reference material

This lecture note is based on (Chollet and Allaire 2018).

References

Chollet, F., and J. Allaire. 2018. Deep Learning with R. Manning Publications. https://books.google.no/books?id=xnIRtAEACAAJ.