liveBook · Manning

Vector arithmetic

Vector arithmetic is the application of operations such as addition, subtraction, scalar multiplication, and weighted combinations to numerical vectors.

How 2 Manning books explain it

Learn Generative AI with PyTorch

The manipulation of latent vectors by weighted averaging to interpolate between generated attributes in latent space.

How it is used
Uses latent-vector interpolation to transition generated images between selected attributes.
How deep it goes
Explains weighted averages, tensor preparation, generator inputs, and combined interpolation, but does not derive latent-space geometry.
Examples
Demonstrates male-to-female face interpolation, eyeglasses variation, and a 6×6 grid combining both transitions.
What you can do after
Apply vector arithmetic by interpolating noise tensors and feeding them with labels into a trained generator.

Read how Learn Generative AI with PyTorch explains vector arithmetic →

Natural Language Processing in Action, Second Edition

Vector algebra is the system of addition, subtraction, scalar operations, and other mathematical operations on vectors.

How it is used
Uses word-vector geometry to answer analogy questions in NLP systems.
How deep it goes
Explains addition, subtraction, displacement, and nearest-vector lookup, stopping short of implementation details.
Examples
Uses the Portland Timbers plus Seattle minus Portland analogy and geometric word-vector visualizations.
What you can do after
Apply it via Word2Vec to transform word relationships into analogy answers.

Read how Natural Language Processing in Action, Second Edition explains vector arithmetic →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.