liveBook · Manning

Tensor

Also called multidimensional array

A tensor is a multidimensional numerical array whose values are arranged along indexed dimensions and can be manipulated through mathematical computation.

How 10 Manning books explain it

Deep Learning with R, Third Edition

A JAX array is JAX's numerical array object representing values on which transformed and accelerated computations can operate.

How it is used
Introduces tensors as containers for neural-network data and learned weights.
How deep it goes
Explains rank, shape, dtype, slicing, and common data layouts through runnable examples rather than formal derivations.
Examples
Uses MNIST image arrays, JAX array creation, and PyTorch tensor operations as concrete examples.
What you can do after
Apply it via R and NumPy to inspect, slice, and preprocess tensors for a neural network.

Read how Deep Learning with R, Third Edition explains tensor →

Natural Language Processing in Action, Second Edition

A tensor is a multidimensional numerical array used to represent and transform structured data in machine-learning computations.

How it is used
Uses tensors to carry text features, model weights, and predictions through neural-network computations.
How deep it goes
Works through tensor conversion, dimensions, and CNN layer shapes; does not explain tensor storage internals.
Examples
Uses part-of-speech pattern matching and a CNN text classifier to demonstrate tensor construction and shape changes.
What you can do after
Apply it via PyTorch to convert tabular data, prepare convolution inputs, and inspect output shapes.

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

Learn Generative AI with PyTorch

A multidimensional numerical array used in PyTorch to represent model inputs, outputs, and intermediate values.

How it is used
Uses tensors to prepare and hold numerical inputs for deep learning models.
How deep it goes
Works through creation, data types, indexing, reshaping, concatenation, and dimension-specific reductions.
Examples
Uses presidential heights, Fashion MNIST images, and exponential-curve training data to demonstrate tensor operations.
What you can do after
Apply tensor operations via PyTorch to create, inspect, reshape, index, and summarize numerical data.

Read how Learn Generative AI with PyTorch explains tensor →

Build AI Drug Discovery Pipelines

A tensor is a multidimensional numerical array that stores data and supports operations for machine-learning computation.

How it is used
Uses tensors to represent neural-network inputs, outputs, and parameters in a drug-discovery workflow.
How deep it goes
Defines tensors and demonstrates creation, inspection, conversion, indexing, reshaping, concatenation, and mathematical operations.
Examples
Demonstrates two-dimensional arrays and converts molecular fingerprints and kinase activities into tensors.
What you can do after
Apply it via PyTorch to create, inspect, convert, and manipulate tensors for a neural-network dataset.

Read how Build AI Drug Discovery Pipelines explains tensor →

Grokking AI Algorithms, Second Edition

A tensor is a multidimensional numerical array used to represent data and intermediate computations in machine-learning models.

How it is used
Uses tensors to represent neural-network inputs, weights, outputs, and image feature maps for layer-wide computation.
How deep it goes
Defines tensors by dimension and illustrates image shapes and decoder concatenation, while deferring the details of tensor algebra.
Examples
Illustrates scalars, vectors, image batches, an 8×8 color image, and concatenated U-Net feature maps.
What you can do after
Supports evaluating and understanding tensor shapes and their role in neural-network computation.

Read how Grokking AI Algorithms, Second Edition explains tensor →

Build a Text-to-Image Generator (from Scratch)

A tensor is a multidimensional numerical array used to represent data and intermediate computations in a neural network.

How it is used
Represents images, token sequences, embeddings, and intermediate neural-network computations for training and inference.
How deep it goes
Explains shapes, values, dtypes, padding, batching, and device placement while deferring detailed attention calculations.
Examples
Uses normalized image batches, a padded 2 × 64 prompt tensor, and a 4 × 256 sentence-embedding tensor.
What you can do after
Apply it via PyTorch to convert, shape, batch, normalize, pad, and place model inputs on CPU or CUDA.

Read how Build a Text-to-Image Generator (from Scratch) explains tensor →

GPU Programming with Triton

A tensor is a multidimensional array used to represent and manipulate structured data.

How it is used
Represents structured numerical data for blocked GPU computations in deep learning and scientific workloads.
How deep it goes
Explains tile execution, matrix memory layout, and local reductions, while noting that grid-wide reductions require extra orchestration.
Examples
Uses matrix multiplication and tile-local sum, maximum, and custom reductions as examples.
What you can do after
Understand how Triton maps tensor tiles to GPU work and why matrix layout and reduction scope matter.

Read how GPU Programming with Triton explains tensor →

Deep Learning with Python, Third Edition

A tensor with three axes, used here for an image or feature-map representation with height, width, and depth.

How it is used
Represents images and convolutional feature maps through height, width, and depth axes.
How deep it goes
Defines rank-3 dimensions and channels, then demonstrates convolutional transformation without detailing tensor operations beyond feature extraction.
Examples
Uses RGB images, black-and-white MNIST inputs, and a (28, 28, 1) to (26, 26, 64) transformation.
What you can do after
Evaluate/understand how spatial axes and channels encode images and learned visual patterns.

Read how Deep Learning with Python, Third Edition explains tensor →

Geometry for Programmers

A multidimensional array is an indexed data structure containing values arranged along two or more dimensions.

How it is used
Generalizes vectors and matrices when describing multidimensional data structures with defined operations.
How deep it goes
Defines tensor algebra and connects it to vector and matrix operations without detailing higher-dimensional tensor operations.
Examples
Uses a nested 2D array and a 3×3 inertia tensor to illustrate tensor representations.
What you can do after
Understand tensors as structured arrays and recognize vectors and matrices as tensor cases.

Read how Geometry for Programmers explains tensor →

Retrieval Augmented Generation, The Foundational Ideas

A tensor is a multidimensional numerical array used to represent data and intermediate computations in machine-learning models.

How it is used
Represents independently encoded passages and exposes them as decoder inputs for joint answer synthesis.
How deep it goes
Explains tensor shape and reshape-based fusion, but stops short of general tensor operations or numerical implementation details.
Examples
Uses N question–title–passage sequences and an [N, sequence_length, hidden] encoder output.
What you can do after
Evaluate/understand how FiD reshapes encoder tensors before decoder cross-attention.

Read how Retrieval Augmented Generation, The Foundational Ideas explains tensor →

Also covered in

What to know first

Related concepts

Questions about tensor

What is tensor?

A tensor is a multidimensional numerical array whose values are arranged along indexed dimensions and can be manipulated through mathematical computation.

Which Manning books explain tensor?

Deep Learning with R, Third Edition, Natural Language Processing in Action, Second Edition, Learn Generative AI with PyTorch, Build AI Drug Discovery Pipelines, Grokking AI Algorithms, Second Edition, Build a Text-to-Image Generator (from Scratch), GPU Programming with Triton, Deep Learning with Python, Third Edition and 2 more.

What should I know before learning tensor?

Manning books that teach tensor usually introduce language model, array, backpropagation and machine learning first.

What kinds of tensor are there?

Kinds of tensor include 4d tensor, 5D tensor, constant tensor and eager tensor.

What is tensor also called?

Tensor is also called multidimensional array.

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.