TensorFlow, a general purpose numerical computing library, was nominally developed for python and has been proving support for approximately 2 years now. This is one of the reasons why Python has always been preferred over R.
Rstudio (a free and open-source integrated development environment ) made R Interface with TensorFlow plausible. Rstudio formally announced their work on creating R interfaces to TensorFlow at rstudio::conf on Saturday. Here is JJ Allaire, the CEO of Rstudio, addressing the conference.
Interfacing R and TensorFlow has a suite of packages that provides high-level interfaces to deep learning models (Keras) and standard regression and classification models (Estimators). Here we have some interfaces to TensorFlow:
- Keras, a language for building neural networks as connections between general purpose layers. R interface to Keras focuses on enabling fast experimentation. You can have a look on the documentation for R Interface to Keras.
- tfestimators package, is an R interface to TensorFlow Estimators, with the mian aim to provide a flexible framework and implementation to different models. For a detailed information, read R Interface to TensorFlow Estimator.
- tensorflow is a low-level interface to the TensorFlow computational graph, providing access to the complete TensorFlow API from within R. Read this article on R Interface to Core TensorFlow API.
- tfdatasets package provides access to the Dataset API, including high-level convenience functions for easy integration. Read more on R interface to TensorFlow dataset API.
Considering the fact that not all users will have complete access to high-end NVIDIA GPU, using GPUs in the cloud has been made possible. Here are a few methods for the same :
- For Google’s hosted machine learning engine : cloudml package ,.
- For an Amazon EC2 image preconfigured with NVIDIA CUDA drivers, TensorFlow : RStudio Server with Tensorflow-GPU for AWS
- For Ubuntu 16.04: cloud desktop with a GPU
On the other hand, for a user having required NVIDIA GPU hardware, here are steps to set up GPU in the local workstation.
Our take on this:
It has always been a major topic of discussion to choose between R and Python. Python was given the preference as it could be interfaced with TensorFlow and Keras. The creation of R interface with TensorFlow is a good news for all R users.You can also read this article on Analytics Vidhya's Android APP