Sat, Aug 22 Β· 10:00 AM IST
This is an in-person event only and filling this google form is mandatory https://forms.gle/5oY75Nk7FXzAJCdw5 if not filled, security will not allow at the entrance. Make sure you are filling correct details, as these will be verified against your government id.
The goal is simple:
> By the end of the session, participants should understand PyTorch β not just memorize its APIs.
We will go deep into:
πΉ What exactly is PyTorch?
Python vs PyTorch, PyTorch vs NumPy, eager execution, tensors, neural-network abstractions, and CPU/GPU execution.
πΉ Tensors beyond `torch.tensor()`
Shapes, dimensions, dtypes, devices, indexing, slicing, masking, broadcasting, reductions, matrix multiplication, batched operations, and `einsum`.
πΉ Tensor memory β the part most tutorials skip
Storage, strides, contiguous vs non-contiguous tensors, views vs copies, `reshape`, `view`, `transpose`, `permute`, `squeeze`, and `unsqueeze`.
πΉ Autograd without the magic
We will calculate derivatives manually first and then verify them using PyTorch.
From:
`y = xΒ²`
to:
`z = Wx + b`
to:
`L = (z - y)Β²`
We will trace exactly how PyTorch builds the computation graph and how gradients eventually arrive in:
`weight.grad`
We will cover `requires_grad`, leaf/non-leaf tensors, `grad_fn`, gradient accumulation, `.backward()`, `torch.autograd.grad`, `detach`, `no_grad`, `inference_mode`, and common in-place operation pitfalls.
πΉ From Tensor β Parameter β Module β Model
We will open up `nn.Module` and understand parameter registration, buffers, submodules, initialization, `state_dict`, train/eval mode, saving and loading.
And then we will build our own `nn.Linear` from scratch instead of treating it as a black box.
πΉ The training loop β completely exposed
No high-level abstractions hiding what happens:
Data β Model β Prediction β Loss β Backward β Gradient β Optimizer β Updated Weights
We will even manually perform:
`W = W - learning_rate Γ W.grad`
before using `optimizer.step()`.
### Hands-on projects
Project 1: Rebuild `nn.Linear` ourselves and compare its forward pass and gradients against PyTorch's implementation.
Project 2: Build and train a neural network using only tensors, Parameters, matrix multiplication, ReLU, logits, Softmax and Autograd β without relying on high-level layers.
The session succeeds if everyone can confidently answer three questions:
1. Where exactly is a model's weight stored?
2. Where exactly does the gradient come from?
3. What mathematically happens when `optimizer.step()` executes?
Because once these three things are clear, PyTorch stops looking like magic.
Forward computes values.
Backward computes gradients.
Optimizer step changes parameters.
That is where we begin.