Keras integration with R
Keras is a set of open source neural network libraries coded in Python. It is capable of running on top of MxNet, TensorFlow, or Theano. The steps to install Keras in RStudio are very simple. The following code snippet gives the steps for installation and we can check whether Keras is working by checking the load of the MNIST
dataset.
By default, RStudio loads the CPU version of TensorFlow. Once Keras is loaded, we have a powerful set of deep learning libraries that can be utilized by R programmers to execute neural networks and deep learning. To install Keras for R, use this code:
install.packages("devtools") devtools::install_github("rstudio/keras")
At this point, we load the keras
library:
library(keras)
Finally, we check whether keras is installed correctly by loading the MNIST
dataset:
> data=dataset_mnist()