liveBook · Manning

Keras

As explained in Grokking Machine Learning

An open-source deep-learning library providing high-level APIs for constructing and training neural networks.

Keras is a high-level API for building and training neural networks. A sequential model is assembled from layers, then compiled and fit to data. Examples include classifying points in a circular, nonlinear pattern and recognizing handwritten digits. section 10.3

A typical workflow in these examples is to:

  • Preprocess inputs and convert class labels to categorical vectors. section 10.3
  • Add dense layers and dropout, then compile with a loss, optimizer, and accuracy metric. section 10.3
  • Train with fit and use predictions to classify test images. section 10.3
Figure 10.20 Neural networks are great for nonlinearly separable sets. To test this, we’ll train a neural network on this circular dataset.

The circular dataset illustrates why a neural network can be useful when classes require a nonlinear decision boundary. section 10.3

How Grokking Machine Learning covers it

How deep it goes
Demonstrates preprocessing, layer construction, compilation, training, and prediction without detailing library internals.
Examples
Uses a two-feature circular dataset and MNIST handwritten digits to demonstrate classification.
What it assumes
Assumes neural-network theory, while demonstrating data preprocessing and model training in practice.
What you can do after
Build from scratch and train classifiers for nonlinear points and handwritten digits.
How it connects
Connects Keras with neural networks, TensorFlow, and PyTorch.

Also explained in

Compare how 6 books explain Keras →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning. The section links point to the parts of the book it draws on.