8
$\begingroup$

I don't see a package for doing Convolutional Neural Networks in R. Has anyone implemented this kind of algorithm in R?

$\endgroup$
  • $\begingroup$ don't think so, even if it was implemented, it would probably lack support for using. I would suggest Tensorflow or Skflow for python, caffe for C++ or caffe on spark for Apache Spark. $\endgroup$ – GameOfThrows May 25 '16 at 13:34
  • $\begingroup$ @GameOfThrows Thanks, I think you're right. I use Tensorflow and Caffe but I'd just like to use R. $\endgroup$ – Hack-R May 25 '16 at 13:38
3
$\begingroup$

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

| improve this answer | |
$\endgroup$
3
$\begingroup$

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

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for your answer. I've used both and did not think that they provided CNN algorithms? I just searched the documentation for both for the word convolutional and nothing came up. Do they actually have this functionality? $\endgroup$ – Hack-R Aug 20 '16 at 12:01
2
$\begingroup$

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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Yes, also RNN, LSTM. They have many examples in their github $\endgroup$ – hoaphumanoid Aug 20 '16 at 12:10
  • $\begingroup$ Ah, yes thanks. I have used mxnet for image classification but didn't think it had CNN algorithms for the same. I see a CNN text classification example. I probably should've specified image classification. Still, perhaps it can be leveraged as such. I will look into it. Thanks! +1 $\endgroup$ – Hack-R Aug 20 '16 at 13:38
0
$\begingroup$

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

| improve this answer | |
$\endgroup$
0
$\begingroup$

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.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.