liveBook · Manning

Data transformation

As explained in Deep Learning with Python, Third Edition

A transformation that maps data or representations within or between geometric spaces.

Imagine red and blue sheets of paper crumpled together. The colors represent two classes that are hard to separate in their folded form. A neural network learns a transformation that gradually “uncrumples” the data until the classes are easier to distinguish. Each layer makes a small change; the stack can produce a complex change in a high-dimensional space. section 2.3.6

Figure 2.14 Uncrumpling a complicated manifold of data
ch02 geometric interpretation 4

The uncrumpling diagram makes the central idea visible: transform a folded data manifold into a representation whose classes are easier to separate. section 2.3.6

In a deep learning model, these transformations are tensor operations arranged in layers. Their learned weights determine how the layers transform inputs; training adjusts those weights to reduce a loss. The useful rule of thumb is to think of a deep network as many simple transformations composed into one difficult one. section 2.3.6 section 20.1.1

A different kind of transformation: preprocessing

A dataset can also transform elements before they reach a model. For example, `dataset.map(lambda x: tf.reshape(x, (4, 4)), num_parallel_calls=8)` changes each sample’s shape from `(16,)` to `(4, 4)`. This is a specified preprocessing operation, not the geometric transformation learned through model weights. section 8.2.4 section 20.1.1

A learned mapping is useful, but do not mistake it for human understanding. It is fitted to training examples and may fail when inputs depart from their patterns. section 19.1.4

How Deep Learning with Python, Third Edition covers it

How deep it goes
Explains layered transformations through a paper analogy and identifies tensor operations, without deriving the geometry mathematically.
Examples
Uses crumpled colored paper to illustrate class separation and a Dataset reshape to illustrate specified preprocessing.
What it assumes
Builds on tensor operations and layers, but develops the geometric intuition with a concrete analogy.
What you can do after
Evaluate/understand a deep network as composed learned transformations, while distinguishing them from specified dataset preprocessing.
How it connects
Links transformations to tensor operations, layers, data manifolds, learned weights, loss functions, and gradient descent.

Also explained in

Compare how 20 books explain data transformation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Deep Learning with Python, Third Edition. The section links point to the parts of the book it draws on.