Tensor
A tensor is a multidimensional, array-like structure of values indexed along zero or more dimensions and used for numerical computation.
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
- Uses tensors to hold numerical data and model weights and to supply inputs to neural-network operations.
- How deep it goes
- Defines rank, shape, and dtype; works through image preprocessing and slicing, then introduces JAX array creation without detailing its internals.
- Examples
- Shows JAX arrays of ones, zeros, and explicit dtype alongside MNIST image shapes and preprocessing.
- What you can do after
- Apply it via `jax.numpy` to create arrays, and inspect tensor rank, shape, and dtype when preparing numerical data.
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
- Carries numerical text features, learned weights, and layer outputs through neural-network computations.
- How deep it goes
- Works through conversion, dimensions, and layer-shape calculations, without developing tensor storage internals.
- Examples
- Uses part-of-speech sentence features, a three-word convolutional filter, and printed CNN layer shapes.
- What you can do after
- Build it from scratch by converting numerical data to PyTorch tensors and checking shapes across CNN layers.
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
- Holds numerical input data and supports the preparation of images for deep learning models.
- How deep it goes
- Works through creation, dtypes, indexing, shapes, reshaping, and reductions without developing tensor internals.
- Examples
- Uses presidential heights for tensor operations and Fashion MNIST clothing images for preprocessing.
- What you can do after
- Apply it via PyTorch to create, inspect, reshape, and reduce tensors and prepare image inputs.
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
- Represents neural-network inputs, weights, outputs, and image feature maps for layer-wide computation.
- How deep it goes
- Defines tensors through dimensions and works through image shapes and decoder concatenation; defers tensor algebra details.
- Examples
- Uses numerical scalars and vectors, color-image and image-batch shapes, and a 24×8×8 decoder tensor formed by concatenation.
- What you can do after
- Evaluate/understand tensor shapes in image models and how concatenating feature maps changes channel count.
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 →
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.
Related concepts
- rank-4 tensorproduces · A rank-4 tensor is a tensor with four axes, formed by stacking rank-3 tensors along an additional axis.
- arraykind of · An array is an indexed, ordered collection of elements arranged in one or more dimensions, with elements accessed by position.
- PyTorchused by · PyTorch is an open-source machine-learning framework for Python that provides tensor computation, automatic differentiation, and tools for building and training neural networks.
- ToTensorproduced by · ToTensor is a torchvision transform that converts supported image data into channel-first PyTorch tensors, typically scaling integer pixel values to floating-point values.
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.






