Custom training: basics

In the previous tutorial we covered the TensorFlow APIs for automatic differentiation, a basic building block for machine learning. In this tutorial we will use the TensorFlow primitives introduced in the prior tutorials to do some simple machine learning. TensorFlow also includes a higher-level neural networks API (tf.keras) which provides useful abstractions to reduce boilerplate.

Automatic differentiation and gradient tape

In the previous tutorial we introduced Tensors and operations on them. In this tutorial we will cover automatic differentiation, a key technique for optimizing machine learning models. Setup import tensorflow as tf tf.enable_eager_execution() tfe = tf.contrib.eager # Shorthand for some symbols Derivatives of a function TensorFlow provides APIs for automatic differentiation – computing the derivative

Lesson 2: Text classification with Keras

After learning about basic classification at lesson 1: Basic classification. Today, we learn about text classification with Keras. This notebook classifies movie reviews as positive or negative using the text of the review. This is an example of binary—or two-class—classification, an important and widely applicable kind of machine learning problem. We’ll use the IMDB dataset