TensorFlow for Rhttps://blogs.rstudio.com/tensorflow/
News, insights, and in-depth case studies for the R interface to TensorFlow and Keras.
TensorFlow for Rhttps://blogs.rstudio.com/tensorflow/images/favicon.pnghttps://blogs.rstudio.com/tensorflow/
RadixWed, 06 Feb 2019 00:00:00 +0000Audio classification with Keras: Looking closer at the non-deep learning partsSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2019-02-07-audio-background
Sometimes, deep learning is seen - and welcomed - as a way to avoid laborious preprocessing of data. However, there are cases where preprocessing of sorts does not only help improve prediction, but constitutes a fascinating topic in itself. One such case is audio classification. In this post, we build on a previous post on this blog, this time focusing on explaining some of the non-deep learning background. We then link the concepts explained to updated for near-future releases TensorFlow code.https://blogs.rstudio.com/tensorflow/posts/2019-02-07-audio-backgroundWed, 06 Feb 2019 00:00:00 +0000Discrete Representation Learning with VQ-VAE and TensorFlow ProbabilitySigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2019-01-24-vq-vae
Mostly when thinking of Variational Autoencoders (VAEs), we picture the prior as an isotropic Gaussian. But this is by no means a necessity. The Vector Quantised Variational Autoencoder (VQ-VAE) described in van den Oord et al's "Neural Discrete Representation Learning" features a discrete latent space that allows to learn impressively concise latent representations. In this post, we combine elements of Keras, TensorFlow, and TensorFlow Probability to see if we can generate convincing letters resembling those in Kuzushiji-MNIST.https://blogs.rstudio.com/tensorflow/posts/2019-01-24-vq-vaeThu, 24 Jan 2019 00:00:00 +0000Getting started with TensorFlow Probability from RSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2019-01-08-getting-started-with-tf-probability
TensorFlow Probability offers a vast range of functionality ranging from distributions over probabilistic network layers to probabilistic inference. It works seamlessly with core TensorFlow and (TensorFlow) Keras. In this post, we provide a short introduction to the distributions layer and then, use it for sampling and calculating probabilities in a Variational Autoencoder.https://blogs.rstudio.com/tensorflow/posts/2019-01-08-getting-started-with-tf-probabilityTue, 08 Jan 2019 00:00:00 +0000Concepts in object detectionSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-12-18-object-detection-concepts
As shown in a previous post, naming and locating a single object in an image is a task that may be approached in a straightforward way. This is not the same with general object detection, though - naming and locating several objects at once, with no prior information about how many objects are supposed to be detected.
In this post, we explain the steps involved in coding a basic single-shot object detector: Not unlike SSD (Single-shot Multibox Detector), but simplified and designed not for best performance, but comprehensibility.https://blogs.rstudio.com/tensorflow/posts/2018-12-18-object-detection-conceptsTue, 18 Dec 2018 00:00:00 +0000Entity embeddings for fun and profitSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-11-26-embeddings-fun-and-profit
Embedding layers are not just useful when working with language data. As "entity embeddings", they've recently become famous for applications on tabular, small-scale data. In this post, we exemplify two possible use cases, also drawing attention to what not to expect.https://blogs.rstudio.com/tensorflow/posts/2018-11-26-embeddings-fun-and-profitMon, 26 Nov 2018 00:00:00 +0000You sure? A Bayesian approach to obtaining uncertainty estimates from neural networksSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-11-12-uncertainty_estimates_dropout
In deep learning, there is no obvious way of obtaining uncertainty estimates. In 2016, Gal and Ghahramani proposed a method that is both theoretically grounded and practical: use dropout at test time. In this post, we introduce a refined version of this method (Gal et al. 2017) that has the network itself learn how uncertain it is.https://blogs.rstudio.com/tensorflow/posts/2018-11-12-uncertainty_estimates_dropoutMon, 12 Nov 2018 00:00:00 +0000Naming and locating objects in imagesSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-11-05-naming-locating-objects
Object detection (the act of classifying and localizing multiple objects in a scene) is one of the more difficult, but very relevant in practice deep learning tasks. We'll build up to it in several posts. Here we start with the simpler tasks of naming and locating a single object.https://blogs.rstudio.com/tensorflow/posts/2018-11-05-naming-locating-objectsMon, 05 Nov 2018 00:00:00 +0000Representation learning with MMD-VAESigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-10-22-mmd-vae
Like GANs, variational autoencoders (VAEs) are often used to generate images. However, VAEs add an additional promise: namely, to model an underlying latent space. Here, we first look at a typical implementation that maximizes the evidence lower bound. Then, we compare it to one of the more recent competitors, MMD-VAE, from the Info-VAE (information maximizing VAE) family.https://blogs.rstudio.com/tensorflow/posts/2018-10-22-mmd-vaeMon, 22 Oct 2018 00:00:00 +0000Winner takes all: A look at activations and cost functionsSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-10-11-activations-intro
Why do we use the activations we use, and how do they relate to the cost functions they tend to co-appear with? In this post we provide a conceptual introduction.https://blogs.rstudio.com/tensorflow/posts/2018-10-11-activations-introThu, 11 Oct 2018 00:00:00 +0000More flexible models with TensorFlow eager execution and KerasSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-10-02-eager-wrapup
Advanced applications like generative adversarial networks, neural style transfer, and the attention mechanism ubiquitous in natural language processing used to be not-so-simple to implement with the Keras declarative coding paradigm. Now, with the advent of TensorFlow eager execution, things have changed. This post explores using eager execution with R.https://blogs.rstudio.com/tensorflow/posts/2018-10-02-eager-wrapupTue, 02 Oct 2018 00:00:00 +0000Collaborative filtering with embeddingsSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-09-26-embeddings-recommender
Embeddings are not just for use in natural language processing. Here we apply embeddings to a common task in collaborative filtering - predicting user ratings - and on our way, strive for a better understanding of what an embedding layer really does.https://blogs.rstudio.com/tensorflow/posts/2018-09-26-embeddings-recommenderWed, 26 Sep 2018 00:00:00 +0000Image-to-image translation with pix2pixSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-09-20-eager-pix2pix
Conditional GANs (cGANs) may be used to generate one type of object based on another - e.g., a map based on a photo, or a color video based on black-and-white. Here, we show how to implement the pix2pix approach with Keras and eager execution.https://blogs.rstudio.com/tensorflow/posts/2018-09-20-eager-pix2pixThu, 20 Sep 2018 00:00:00 +0000Attention-based Image Captioning with KerasSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-09-17-eager-captioning
Image captioning is a challenging task at intersection of vision and language. Here, we demonstrate using Keras and eager execution to incorporate an attention mechanism that allows the network to concentrate on image features relevant to the current state of text generation.https://blogs.rstudio.com/tensorflow/posts/2018-09-17-eager-captioningMon, 17 Sep 2018 00:00:00 +0000Neural style transfer with eager execution and KerasSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-09-10-eager-style-transfer
Continuing our series on combining Keras with TensorFlow eager execution, we show how to implement neural style transfer in a straightforward way. Based on this easy-to-adapt example, you can easily perform style transfer on your own images.https://blogs.rstudio.com/tensorflow/posts/2018-09-10-eager-style-transferMon, 10 Sep 2018 00:00:00 +0000Getting started with deep learning in RSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-09-07-getting-started
Many fields are benefiting from the use of deep learning, and with the R keras, tensorflow and related packages, you can now easily do state of the art deep learning in R. In this post, we want to give some orientation as to how to best get started.https://blogs.rstudio.com/tensorflow/posts/2018-09-07-getting-startedFri, 07 Sep 2018 00:00:00 +0000Generating images with Keras and TensorFlow eager executionSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-08-26-eager-dcgan
Generative adversarial networks (GANs) are a popular deep learning approach to generating new entities (often but not always images). We show how to code them using Keras and TensorFlow eager execution.https://blogs.rstudio.com/tensorflow/posts/2018-08-26-eager-dcganSun, 26 Aug 2018 00:00:00 +0000Attention-based Neural Machine Translation with KerasSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-07-30-attention-layer
As sequence to sequence prediction tasks get more involved, attention mechanisms have proven helpful. A prominent example is neural machine translation. Following a recent Google Colaboratory notebook, we show how to implement attention in R.https://blogs.rstudio.com/tensorflow/posts/2018-07-30-attention-layerMon, 30 Jul 2018 00:00:00 +0000Classifying physical activity from smartphone dataNick Strayerhttps://blogs.rstudio.com/tensorflow/posts/2018-07-17-activity-detection
Using Keras to train a convolutional neural network to classify physical activity. The dataset was built from the recordings of 30 subjects performing basic activities and postural transitions while carrying a waist-mounted smartphone with embedded inertial sensors.https://blogs.rstudio.com/tensorflow/posts/2018-07-17-activity-detectionTue, 17 Jul 2018 00:00:00 +0000Predicting Sunspot Frequency with KerasMatt DanchoSigrid Keydanahttps://blogs.rstudio.com/tensorflow/posts/2018-06-25-sunspots-lstm
In this post we will examine making time series predictions using the sunspots dataset that ships with base R. Sunspots are dark spots on the sun, associated with lower temperature. Our post will focus on both how to apply deep learning to time series forecasting, and how to properly apply cross validation in this domain.https://blogs.rstudio.com/tensorflow/posts/2018-06-25-sunspots-lstmMon, 25 Jun 2018 00:00:00 +0000Simple Audio Classification with KerasDaniel Falbelhttps://blogs.rstudio.com/tensorflow/posts/2018-06-06-simple-audio-classification-keras
In this tutorial we will build a deep learning model to classify words. We will use the Speech Commands dataset which consists of 65,000 one-second audio files of people saying 30 different words.https://blogs.rstudio.com/tensorflow/posts/2018-06-06-simple-audio-classification-kerasWed, 06 Jun 2018 00:00:00 +0000GPU Workstations in the Cloud with PaperspaceJ.J. Allairehttps://blogs.rstudio.com/tensorflow/posts/2018-04-02-rstudio-gpu-paperspace
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.https://blogs.rstudio.com/tensorflow/posts/2018-04-02-rstudio-gpu-paperspaceMon, 02 Apr 2018 00:00:00 +0000lime v0.4: The Kitten Picture EditionThomas Lin Pedersenhttps://blogs.rstudio.com/tensorflow/posts/2018-03-09-lime-v04-the-kitten-picture-edition
A new major release of lime has landed on CRAN. lime is an R port of the Python library of the same name by Marco Ribeiro that allows the user to pry open black box machine learning models and explain their outcomes on a per-observation basishttps://blogs.rstudio.com/tensorflow/posts/2018-03-09-lime-v04-the-kitten-picture-editionFri, 09 Mar 2018 00:00:00 +0000Deep Learning for Cancer ImmunotherapyLeon Eyrich Jessenhttps://blogs.rstudio.com/tensorflow/posts/2018-01-29-dl-for-cancer-immunotherapy
The aim of this post is to illustrate how deep learning is being applied in cancer immunotherapy (Immuno-oncology or Immunooncology) - a cancer treatment strategy, where the aim is to utilize the cancer patient's own immune system to fight the cancer.https://blogs.rstudio.com/tensorflow/posts/2018-01-29-dl-for-cancer-immunotherapyMon, 29 Jan 2018 00:00:00 +0000Predicting Fraud with Autoencoders and KerasDaniel Falbelhttps://blogs.rstudio.com/tensorflow/posts/2018-01-24-keras-fraud-autoencoder
In this post we will train an autoencoder to detect credit card fraud. We will also demonstrate how to train Keras models in the cloud using CloudML. The basis of our model will be the Kaggle Credit Card Fraud Detection dataset.https://blogs.rstudio.com/tensorflow/posts/2018-01-24-keras-fraud-autoencoderThu, 25 Jan 2018 00:00:00 +0000Analyzing rtweet Data with kerasformulaPete Mohantyhttps://blogs.rstudio.com/tensorflow/posts/2018-01-24-analyzing-rtweet-data-with-kerasformula
The kerasformula package offers a high-level interface for the R interface to Keras. It’s main interface is the kms function, a regression-style interface to keras_model_sequential that uses formulas and sparse matrices. We use kerasformula to predict how popular tweets will be based on how often the tweet was retweeted and favorited.https://blogs.rstudio.com/tensorflow/posts/2018-01-24-analyzing-rtweet-data-with-kerasformulaWed, 24 Jan 2018 00:00:00 +0000Deep Learning With Keras To Predict Customer ChurnMatt Danchohttps://blogs.rstudio.com/tensorflow/posts/2018-01-11-keras-customer-churn
Using Keras to predict customer churn based on the IBM Watson Telco Customer Churn dataset. We also demonstrate using the lime package to help explain which features drive individual model predictions. In addition, we use three new packages to assist with Machine Learning: recipes for preprocessing, rsample for sampling data and yardstick for model metrics.https://blogs.rstudio.com/tensorflow/posts/2018-01-11-keras-customer-churnThu, 11 Jan 2018 00:00:00 +0000R Interface to Google CloudMLJ.J. Allairehttps://blogs.rstudio.com/tensorflow/posts/2018-01-10-r-interface-to-cloudml
We are excited to announce the availability of the cloudml package, which provides an R interface to Google Cloud Machine Learning Engine. CloudML provides a number of services including on-demand access to training on GPUs and hyperparameter tuning to optmize key attributes of model architectures.https://blogs.rstudio.com/tensorflow/posts/2018-01-10-r-interface-to-cloudmlWed, 10 Jan 2018 00:00:00 +0000Classifying Duplicate Questions from Quora with KerasDaniel Falbelhttps://blogs.rstudio.com/tensorflow/posts/2018-01-09-keras-duplicate-questions-quora
In this post we will use Keras to classify duplicated questions from Quora. Our implementation is inspired by the Siamese Recurrent Architecture, with modifications to the similarity measure and the embedding layers (the original paper uses pre-trained word vectors)https://blogs.rstudio.com/tensorflow/posts/2018-01-09-keras-duplicate-questions-quoraTue, 09 Jan 2018 00:00:00 +0000Word Embeddings with KerasDaniel Falbelhttps://blogs.rstudio.com/tensorflow/posts/2017-12-22-word-embeddings-with-keras
Word embedding is a method used to map words of a vocabulary to dense vectors of real numbers where semantically similar words are mapped to nearby points. In this example we'll use Keras to generate word embeddings for the Amazon Fine Foods Reviews dataset.https://blogs.rstudio.com/tensorflow/posts/2017-12-22-word-embeddings-with-kerasFri, 22 Dec 2017 00:00:00 +0000Time Series Forecasting with Recurrent Neural NetworksFrançois CholletJ.J. Allairehttps://blogs.rstudio.com/tensorflow/posts/2017-12-20-time-series-forecasting-with-recurrent-neural-networks
In this post, we'll review three advanced techniques for improving the performance and generalization power of recurrent neural networks. We'll demonstrate all three concepts on a temperature-forecasting problem, where you have access to a time series of data points coming from sensors installed on the roof of a building.https://blogs.rstudio.com/tensorflow/posts/2017-12-20-time-series-forecasting-with-recurrent-neural-networksWed, 20 Dec 2017 00:00:00 +0000Image Classification on Small Datasets with KerasFrançois CholletJ.J. Allairehttps://blogs.rstudio.com/tensorflow/posts/2017-12-14-image-classification-on-small-datasets
Having to train an image-classification model using very little data is a common situation, in this article we review three techniques for tackling this problem including feature extraction and fine tuning from a pretrained network.https://blogs.rstudio.com/tensorflow/posts/2017-12-14-image-classification-on-small-datasetsThu, 14 Dec 2017 00:00:00 +0000Deep Learning for Text Classification with KerasFrançois CholletJ.J. Allairehttps://blogs.rstudio.com/tensorflow/posts/2017-12-07-text-classification-with-keras
Two-class classification, or binary classification, may be the most widely applied kind of machine-learning problem. In this excerpt from the book Deep Learning with R, you'll learn to classify movie reviews as positive or negative, based on the text content of the reviews.https://blogs.rstudio.com/tensorflow/posts/2017-12-07-text-classification-with-kerasThu, 07 Dec 2017 00:00:00 +0000tfruns: Tools for TensorFlow Training RunsJ.J. Allairehttps://blogs.rstudio.com/tensorflow/posts/2017-10-04-tfruns
The tfruns package provides a suite of tools for tracking, visualizing, and managing TensorFlow training runs and experiments from R.https://blogs.rstudio.com/tensorflow/posts/2017-10-04-tfrunsWed, 04 Oct 2017 00:00:00 +0000Keras for RJ.J. Allairehttps://blogs.rstudio.com/tensorflow/posts/2017-09-06-keras-for-r
We are excited to announce that the keras package is now available on CRAN. The package provides an R interface to Keras, a high-level neural networks API developed with a focus on enabling fast experimentation.https://blogs.rstudio.com/tensorflow/posts/2017-09-06-keras-for-rTue, 05 Sep 2017 00:00:00 +0000TensorFlow EstimatorsYuan Tanghttps://blogs.rstudio.com/tensorflow/posts/2017-08-31-tensorflow-estimators-for-r
The tfestimators package is an R interface to TensorFlow Estimators, a high-level API that provides implementations of many different model types including linear models and deep neural networks.https://blogs.rstudio.com/tensorflow/posts/2017-08-31-tensorflow-estimators-for-rThu, 31 Aug 2017 00:00:00 +0000TensorFlow v1.3 ReleasedJ.J. Allairehttps://blogs.rstudio.com/tensorflow/posts/2017-08-17-tensorflow-v13-released
The final release of TensorFlow v1.3 is now available. This release marks the initial availability of several canned estimators including DNNClassifier and DNNRegressor.https://blogs.rstudio.com/tensorflow/posts/2017-08-17-tensorflow-v13-releasedThu, 17 Aug 2017 00:00:00 +0000