<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/rstudio-gpu-workstations-in-the-cloud-with-paperspace/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://tensorflow.rstudio.com/blog/rstudio-gpu-paperspace.html"> TensorFlow for R</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>We are very pleased to announce the availability of an <a rel="nofollow" href="https://tensorflow.rstudio.com/tools/cloud_desktop_gpu.html" target="_blank">RStudio TensorFlow template</a> for the <a rel="nofollow" href="https://www.paperspace.com/" target="_blank">Paperspace</a> cloud desktop service.</p>
<p>If you don’t have local access to a modern NVIDIA GPU, your best bet is typically to run GPU intensive training jobs in the cloud. Paperspace is a cloud service that provides access to a fully preconfigured Ubuntu 16.04 desktop environment equipped with a GPU. With the addition of the <a rel="nofollow" href="https://tensorflow.rstudio.com/tools/cloud_desktop_gpu.html" target="_blank">RStudio TensorFlow template</a> you can now provision a ready to use RStudio TensorFlow w/ GPU workstation in just a few clicks. Preconfigured software includes:</p>
<ul>
<li>
<p>RStudio Desktop and RStudio Server</p>
</li>
<li>
<p>NVIDIA GPU libraries (CUDA 8.0 and cuDNN 6.0)</p>
</li>
<li>
<p>TensorFlow v1.4 w/ GPU</p>
</li>
<li>
<p>The R <a rel="nofollow" href="https://tensorflow.rstudio.com/keras/" target="_blank">keras</a>, <a rel="nofollow" href="https://tensorflow.rstudio.com/tfestimators/" target="_blank">tfestimators</a>, and <a rel="nofollow" href="https://tensorflow.rstudio.com/tensorflow/" target="_blank">tensorflow</a> packages.</p>
</li>
<li>
<p>The <a rel="nofollow" href="https://www.tidyverse.org/" target="_blank">tidyverse</a> suite of packages (ggplot2, dplyr, tidyr, readr, etc.)</p>
</li>
</ul>
<div>
<h2>Getting Started</h2>
<p>To get started, first <a rel="nofollow" href="https://www.paperspace.com/account/signup" target="_blank">signup for a Paperspace account</a> (you can use the <code>RSTUDIO</code> promo code when you sign up to receive a $5 account credit).</p>
<p>Then, create a new Paperspace instance using the <a rel="nofollow" href="https://tensorflow.rstudio.com/tools/cloud_desktop_gpu.html" target="_blank">RStudio template</a>:</p>
<p><img src="https://i2.wp.com/tensorflow.rstudio.com/blog/images/rstudio-gpu-paperspace/paperspace-machine.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Then, choose one of the Paperspace GPU instances (as opposed to the CPU instances). For example, here we select the P4000 machine type which includes an NVIDIA Quadro P4000 GPU:</p>
<p><img src="https://i0.wp.com/tensorflow.rstudio.com/blog/images/rstudio-gpu-paperspace/paperspace-machine-type.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>See the <a rel="nofollow" href="https://tensorflow.rstudio.com/tools/cloud_desktop_gpu.html" target="_blank">Cloud Desktop GPUs with Paperspace</a> article on the TensorFlow for R website for full details on getting started.</p>
</div>
<div>
<h2>Training a Convolutional MNIST Model</h2>
<p>The performance gains for training convoluational and recurrent models on GPUs can be substantial. Let’s try training the <a rel="nofollow" href="https://tensorflow.rstudio.com/keras/articles/examples/mnist_cnn.html" target="_blank">Keras MNIST CNN example</a> on our new Paperspace instance:</p>
<p><img src="https://i0.wp.com/tensorflow.rstudio.com/blog/images/rstudio-gpu-paperspace/paperspace-mnist-cnn.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Training the model for 12 epochs takes about 1 minute (~ 5 seconds per epoch). On the other hand, training the same model on CPU on a high end Macbook Pro takes 15 minutes! (~ 75 seconds per epoch). Using a Paperspace GPU yields a <em>15x performance gain</em> in model training.</p>
<p>This model was trained on an <a rel="nofollow" href="http://www.nvidia.com/object/quadro-graphics-with-pascal.html" target="_blank">NVIDIA Quadro P4000</a>, which costs $0.40 per hour. Paperspace instances can be configured to automatically shut down after a period of inactivity to prevent accruing cloud charges when you aren’t actually using the machine.</p>
<p>If you are training convolutional or recurrent models and don’t currently have access to a local NVIDIA GPU, using <a rel="nofollow" href="https://tensorflow.rstudio.com/tools/cloud_desktop_gpu.html" target="_blank">RStudio on Paperspace</a> is a great way to accelerate training performance. You can use the <code>RSTUDIO</code> promo code when you sign up for Paperspace to receive a $5 account credit.</p>
</div>
	<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://tensorflow.rstudio.com/blog/rstudio-gpu-paperspace.html"> TensorFlow for R</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/TUtvyKcA_Hk" height="1"></a></div>