PyTorch / Tensor, gradient, and module foundations
PyTorch β Tensor, gradient, and module foundations
CPU tensors, autograd modes, registered state, loss targets, data batches, and one controlled update.
What you will learn
- CPU tensors, autograd modes, registered state, loss targets, data batches, and one controlled update.
CPU tensors, dtypes, and shapes
Construct a tensor with explicit ownership, numeric representation, and axis meaning before building a model.
Start learningAutograd and gradient modes
Trace which operations enter a backward graph and separate gradient accumulation from parameter updates.
Start learningModules, parameters, and buffers
Use nn.Module registration to make trainable values, persistent state, and composition explicit.
Start learningLosses, targets, and reductions
Match a PyTorch loss input contract to target meaning, dimensions, dtype, and weighting.
Start learningDatasets, loaders, and collation
Define one sample and one batch explicitly while preserving identity, coverage, and split boundaries.
Start learningA controlled training and evaluation step
Make the order and state of one complete PyTorch update visible before building a larger training loop.
Start learning