Installation

To get started, install the tensorflow R package from GitHub as follows:

devtools::install_github("rstudio/tensorflow")

Then, use the install_tensorflow() function to install TensorFlow:

library(tensorflow)
install_tensorflow() 

You can confirm that the installation succeeded with:

sess = tf$Session() hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello) 

This will provide you with a default installation of TensorFlow suitable for getting started with the tensorflow R package. See the article on installation to learn about more advanced options, including installing a version of TensorFlow that takes advantage of Nvidia GPUs if you have the correct CUDA libraries installed.


The MXNetR package is an interface of the MXNet library written in C++. It contains feed-forward neural networks and convolutional neural networks (CNN) (MXNetR 2016a).

https://www.is.uni-freiburg.de/resources/r-oeffentlicher-zugriff/deep-learning-in-r/deep-learning-in-r-en?set_language=en


I think mxnet is one of the best options if you code in R. They have an R wrapper but the core is in C++.

They have several examples in the web. One of them is the character recognition with MNIST database. They have support for multi-gpus and also for Spark.


The following 2 packages are available in R for deep neural network training:

  1. darch: Package for Deep Architectures and Restricted Boltzmann Machines. The darch package is built on the basis of the code from G. E. Hinton and R. R. Salakhutdinov (available under Matlab Code for deep belief nets). This package is for generating neural networks with many layers (deep architectures), train them and fine tuning with common known training algorithms like backpropagation or conjugate gradients. Additionally, supervised fine-tuning can be enhanced with maxout and dropout, two recently developed techniques to improve fine-tuning for deep learning. CRAN link: http://cran.um.ac.ir/web/packages/darch/index.html

  2. deepnet: deep learning toolkit in R. Implement some deep learning architectures and neural network algorithms, including BP,RBM,DBN,Deep autoencoder and so on. CRAN link: https://cran.r-project.org/web/packages/deepnet/index.html


I guess there is no package for cnn but you can write your own convolutional layer. mxnet or h2o will be useful for it.

check this out:

http://dmlc.ml/rstats/2015/11/03/training-deep-net-with-R.html

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.