<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/deep-learning-at-rstudioconf-2018/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://rviews.rstudio.com/2018/02/14/deep-learning-rstudio-conf-2018/"> R Views</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Two weeks ago, <a rel="nofollow" href="https://www.rstudio.com/conference/" target="_blank">rstudio::conf 2018</a> was held in San Diego. We had 1,100 people attend the sold-out event. In this post, I summarize my experience of the talks on the topic of deep learning with R, including the keynote by <a rel="nofollow" href="https://www.linkedin.com/profile/view?id=10843566/" target="_blank">J.J. Allaire</a>.</p>
<p><img alt="" src="https://i0.wp.com/rviews.rstudio.com/post/2018-02-13_de_Vries_deep_learning_at_rstudio_conf_files/J.J._video.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h1>Keynote</h1>
<p>The keynote on the second day was J.J. Allaire discussing “Machine Learning with Tensorflow and R”. In this talk, J.J. took us on a tour of how to use TensorFlow with R. He started with the basics, e.g., what is a tensor (it’s an array), and explained how the tensors “flow” in a computation graph in the <code>TensorFlow</code> library. The <code>tensorflow</code> package in R is an interface to the <code>TensorFlow</code> library, meaning you can access the full power of TensorFlow directly from R.</p>
<p><img alt="" src="https://i2.wp.com/rviews.rstudio.com/post/2018-02-13_de_Vries_deep_learning_at_rstudio_conf_files/tensors_flowing.gif?w=456&ssl=1" data-recalc-dims="1"></p>
<p>For several years, there has been a great deal of hype about deep learning, with multiple libraries (primarily written in Python and C++). Of these libraries, TensorFlow seems to get the dominant share of interest. R has always been a language that excels in its ability to interact with other languages, including Fortran, C++, and now Python. With the release of the <code>tensorflow</code> package, R users can make full use of <em>all</em> of the functions in TensorFlow.</p>
<p>Advances in deep learning, including algorithms, GPU computing, and availability of large data sets, have combined for the enormous success of deep learning in many fields. This includes near-human-level performance in the fields of image classification, speech recognition, and machine translation, to name a few.</p>
<p>However, J.J. points out that TensorFlow is quite a low-level mathematical library, and that most practitioners would benefit from writing their neural network code using <code>keras</code>, a package that exposes a high-level API. Keras supports multiple back ends, including TensorFlow, CNTK and Theano. You can find out more at the <a rel="nofollow" href="https://keras.rstudio.com/" target="_blank"><code>keras</code> package page</a>.</p>
<p>J.J. concluded his talk by demonstrating several ways to deploy a <code>keras</code> or <code>tensorflow</code> model, including publishing to RStudio Connect.</p>
<p>To find out more about J.J.’s talk, you can watch the <a rel="nofollow" href="https://www.youtube.com/watch?v=atiYXm7JZv0" target="_blank">keynote video</a> or view the <a rel="nofollow" href="https://rstd.io/ml-with-tensorflow-and-r/" target="_blank">slides</a>. You can also download the <a rel="nofollow" href="https://github.com/rstudio/cheatsheets/raw/master/keras.pdf" target="_blank"><code>keras</code> cheat sheet</a>.</p>
<h1>Other talks</h1>
<p>Following the keynote, the conference split into several tracks. I attended the session1: “interop”, which focused on interoperability between R and several deep-learning frameworks, including deployment options.</p>
<ul>
<li>
<p>The first talk in this session was by <a rel="nofollow" href="https://www.linkedin.com/in/michaelquinn32?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base%3B87KZ5Uq%2FQxSpdhxC0jwFkg%3D%3D" target="_blank">Michael Quinn</a> from Google. Michael discussed “large-scale machine learning using TensorFlow, BigQuery and Cloud ML”. Once you have a <code>keras</code> or <code>tensorflow</code> model, you can deploy this to <a rel="nofollow" href="https://cloud.google.com/ml-engine/" target="_blank">Google Cloud Machine Learning</a> (Cloud ML). What I find interesting about this is that Cloud ML is a service designed for machine learning. Using this service, you can deploy models without having to stand up a virtual machine first. You can do this deployment using R code with the <a rel="nofollow" href="https://tensorflow.rstudio.com/tools/cloudml/articles/getting_started.html" target="_blank"><code>cloudml</code> package</a></p>
</li>
<li>
<p>The next talk was by Javier Luraschi from RStudio, who spoke about “Deploying TensorFlow models with <code>tfdeploy</code>”. The <a rel="nofollow" href="https://tensorflow.rstudio.com/tools/tfdeploy/articles/introduction.html" target="_blank"><code>tfdeploy</code> package</a> exposes a unified way to deploy models to several platforms, including <a rel="nofollow" href="https://www.tensorflow.org/serving/https://www.tensorflow.org/serving/" target="_blank">TensorFlow Serving</a>, <a rel="nofollow" href="https://tensorflow.rstudio.com/tools/cloudml/" target="_blank">Cloud ML</a>, and <a rel="nofollow" href="https://www.rstudio.com/products/connect/" target="_blank">RStudio Connect</a>. Javier made his talk available as <a rel="nofollow" href="http://rpubs.com/jluraschi/deploying-tensorflow-rstudio-conf" target="_blank">slides</a> as well as <a rel="nofollow" href="https://github.com/rstudio/rstudio-conf/tree/master/2018/Deploying_TensorFlow_Models--Javier%20Luraschi" target="_blank">code</a>.</p>
</li>
<li>
<p>The final presentation was by <a rel="nofollow" href="https://www.linkedin.com/in/alikzaidi/" target="_blank">Ali Zaid</a> from Microsoft, who talked about “Reinforcement learning in Minecraft with CNTK-R”. Ali showed how he trained a deep-learning model to control an agent in <a rel="nofollow" href="https://minecraft.net/en-us/" target="_blank">Minecraft</a>, the popular online game. In his experiment, he taught the agent to navigate a maze, as well as understand the some natural language, e.g., “Pick up the red flowers”. He used the <a rel="nofollow" href="https://github.com/Microsoft/CNTK-R" target="_blank"><code>CNTK-R</code> package</a>, which wraps the <a rel="nofollow" href="https://github.com/microsoft/cntk" target="_blank">Microsoft Cognitive Toolkit (CNTK)</a>.</p>
</li>
</ul>
<h1>Conclusion</h1>
<p>In conclusion, I’ll quote directly from J.J. Allaire’s keynote, in which he describes the key takeaways:</p>
<ul>
<li>
<p>TensorFlow is a new general-purpose numerical-computing library with lots to offer the R community.</p>
</li>
<li>
<p>Deep learning has made great progress and will likely increase in importance in various fields in the coming years.</p>
</li>
<li>
<p>R now has a great set of APIs and supporting tools for using TensorFlow and doing deep learning.</p>
</li>
</ul>
<p> </p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://rviews.rstudio.com/2018/02/14/deep-learning-rstudio-conf-2018/"> R Views</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/6jHRLSrXLRI" height="1"></a></div>