Deep Learning with PyTorch

Study Deep Learning with PyTorch with full lessons, revision notes and quick reference, across 41 lessons.

15 modules. 41 lessons. Self-paced.

Roles this course prepares you for

Course curriculum

No exam weights apply. Lessons follow practical prerequisites, from one tensor to a small transformer, then debugging, inference and a final challenge.

Free to read: 5 lessons, no account needed

Start Here (3 lessons)
  1. How this course works (read now)

    • Describe what the course builds, how the three study views differ and how practical checks are judged.
    • Name the practice folder layout and the safety rules for checkpoints, data and cleanup.
  2. Set up a CPU PyTorch environment (read now)

    • Create ~/pytorch-practice/.venv and install the pinned libraries in the documented order.
    • Confirm the versions, the CPU build and the device, and diagnose three common installation failures.
  3. See a network learn before taking it apart (read now)

    • Run a complete supplied training script and identify its data, model, loss, optimiser and loop.
    • Predict how the printed loss should change and explain what a falling loss does and does not prove.
Tensors (3 lessons)
  1. Create and inspect tensors (read now)

    • Create tensors from Python data, NumPy arrays and factory functions.
    • Read and change shape, dtype and device, and explain when a tensor shares memory with its source.
  2. Index, slice and reshape tensors (read now)

    • Select rows, columns and elements, and combine tensors with cat and stack.
    • Reshape and transpose tensors and explain views, copies and contiguity.
  3. Broadcast, reduce and multiply tensors

    • Predict broadcasting results and reduce along a chosen dimension.
    • Multiply matrices and batches with @ and repair shape errors from their messages.

With course access: 36 lessons

Automatic Differentiation (3 lessons)
  1. Compute gradients with autograd

    • Explain how autograd records a computation graph from leaf tensors.
    • Compute a gradient with backward and check it against the chain rule and a finite difference.
  2. Control what autograd records

    • Predict gradient accumulation across backward calls and reset it correctly.
    • Choose between no_grad, inference_mode and detach, and explain the second-backward error.
  3. Write gradient descent by hand

    • Fit a linear model with a hand-written gradient descent loop and explain each step.
    • Predict the effect of the learning rate, then reproduce the fit with torch.optim.SGD.
Models and Data (4 lessons)
  1. Build models with nn.Module

    • Write a network as an nn.Module subclass and as nn.Sequential.
    • Trace tensor shapes through every layer and fix a faulty forward method.
  2. Inspect parameters, buffers and initialisation

    • Predict parameter counts and inspect named parameters, buffers and state_dict.
    • Explain how layers are initialised and why it matters.
  3. Write a dataset and batch it

    • Write a map-style Dataset with __len__ and __getitem__.
    • Batch, shuffle and split it reproducibly with DataLoader and random_split.
  4. Load Fashion-MNIST with transforms and workers

    • Download Fashion-MNIST once, confirm its checksums and inspect its classes and images.
    • Convert images to float tensors with v2 transforms and load them with worker processes safely.
The Training Loop (4 lessons)
  1. Match losses and outputs to the task

    • Choose MSELoss, BCEWithLogitsLoss or CrossEntropyLoss and the output size for a task.
    • Give each loss logits and correctly shaped targets, and convert to probabilities only for reporting.
  2. Write the training loop

    • Write a training loop and a validation pass and explain every line.
    • Distinguish training and evaluation modes from gradient tracking.
  3. Evaluate and log training runs

    • Write an evaluation function that reports loss, accuracy and a baseline.
    • Log one CSV row per epoch and save a chart of the curves.
  4. Checkpoint and resume training

    • Save model, optimizer and scheduler state, epoch and random state in one checkpoint.
    • Resume an interrupted run and show that it continues the same curve.
Making Training Work (3 lessons)
  1. Tune the learning rate and batch size

    • Run a learning-rate sweep and choose a rate from evidence.
    • Explain how batch size changes the number of steps and the noise in the loss.
  2. Compare optimisers and learning-rate schedules

    • Compare SGD with momentum, Adam and AdamW at an equal budget.
    • Apply step, cosine and one-cycle schedules and call them in the right order.
  3. Stabilise deeper networks

    • Diagnose vanishing and exploding gradients from per-layer gradient norms.
    • Apply initialisation, normalisation, residual connections and gradient clipping, and show their effect.
Generalisation (3 lessons)
  1. Diagnose underfitting and overfitting

    • Read training and validation curves to diagnose underfitting and overfitting.
    • Explain why the test set stays out of every choice.
  2. Regularise with weight decay and dropout

    • Apply AdamW weight decay and dropout and measure their effect on validation results.
    • Explain dropout's training and evaluation behaviour.
  3. Augment data and stop early

    • Apply label-preserving training-only augmentation.
    • Stop on validation loss with a patience rule, restore the best checkpoint and report the test result once.
Convolutional Networks (3 lessons)
  1. How convolution and pooling work

    • Compute a convolution by hand and check it with nn.Conv2d.
    • Calculate output shapes from kernel size, padding and stride, and explain channels and pooling.
  2. Build and train a convolutional network

    • Build a small CNN for Fashion-MNIST and trace its shapes.
    • Compare it with the MLP baseline at a fixed budget and similar parameter count.
  3. Inspect a CNN's errors, filters and feature maps

    • Compute and read a confusion matrix with tensors.
    • Visualise first-layer filters and feature maps and describe what they respond to.
Reusing a Trained Network (2 lessons)
  1. Prepare a trained network for reuse

    • Pre-train a CNN on six clothing classes and save its feature layers.
    • Freeze layers, replace the output layer and check what will be trained.
  2. Fine-tune and compare with training from scratch

    • Fine-tune with frozen features and with all layers using parameter groups.
    • Compare with training from scratch at equal data and budget and state the limits of the conclusion.
Sequence Models (2 lessons)
  1. Represent tokens with embeddings and padding

    • Turn variable-length token sequences into a padded batch with lengths.
    • Look up embeddings and keep the padding index out of training.
  2. Train a recurrent sequence classifier

    • Train an LSTM classifier on padded, packed sequences.
    • Show that taking the last padded position gives wrong results and that packing fixes it.
Attention and Transformers (4 lessons)
  1. Implement scaled dot-product attention

    • Compute attention step by step and implement it as a function.
    • Add a causal mask and check the result against F.scaled_dot_product_attention.
  2. Build a transformer block

    • Build a pre-norm transformer block with multi-head attention, positional embeddings, residual connections and a feed-forward layer.
    • Compare it with nn.TransformerEncoderLayer, including batch_first and the nested-tensor warning.
  3. Train a character-level language model

    • Prepare next-character training pairs with a held-out validation segment.
    • Train a small transformer and an LSTM at the same budget and compare validation loss with simple baselines.
  4. Generate text with temperature sampling

    • Generate text one character at a time with greedy and temperature sampling.
    • Explain why fluent output can be meaningless and must not be treated as fact.
Debugging, Repeatability and Speed (4 lessons)
  1. Debug a model that does not learn

    • Apply a step-by-step debugging procedure to a training script.
    • Use the overfit-one-batch test and data checks to find data and label bugs.
  2. Find numerical and mode bugs

    • Detect non-finite values and locate their source.
    • Find bugs caused by softmax before the loss and by evaluation mode left on during training.
  3. Make training repeatable

    • Seed every random source, including DataLoader shuffling and workers.
    • State what repeatability PyTorch does and does not guarantee.
  4. Measure and improve training speed on a CPU

    • Time training correctly and choose thread and worker settings from measurements.
    • Write device-agnostic code and judge optional speed-ups such as torch.compile and bfloat16 autocast.
Saving and Inference (1 lessons)
  1. Save a model and predict in a separate script

    • Rebuild a model and load its weights safely in a separate inference script.
    • Predict in eval mode under inference_mode with input checks and reproduce the evaluation result.
Final Challenge (1 lessons)
  1. Final challenge: a limited-label image classifier

    • Fix a supplied broken baseline, then build, train and evaluate a model under a parameter and time limit.
    • Write a short report that justifies the architecture, training choices and evidence.
Optional: Running on a GPU (1 lessons)
  1. Optional: run the course scripts on a GPU

    • Run a device-agnostic script on an NVIDIA CUDA or Apple MPS GPU you own, in a separate environment.
    • Time GPU runs correctly and explain differences from CPU results.

Study views

  • Full Course
  • Revision
  • Quick Reference

Who this is for

For developers, analysts and students who can write small Python programs, have trained a basic model, and want to build and train neural networks themselves with PyTorch.

Before you begin

  • Write a short Python script, read a traceback, use a terminal, read a NumPy array's shape, and know basic machine learning terms such as feature, label and validation set.
  • Python 3.12 to 3.14 (not 3.14.1) with the documented CPU build of PyTorch 2.14.1, torchvision, NumPy and Matplotlib. Core work runs locally without a GPU or cloud account.

What you will learn

  • Write and explain a complete training loop, from tensors and autograd to checkpoints that resume.
  • Diagnose training problems and overfitting, and fix them from loss curves, gradients and validation results.
  • Build convolutional, recurrent and small transformer models, and predict from a saved model in a separate script.

Unlock all 41 lessons

Course access opens every lesson and adds revision notes, the Quick Reference, saved progress, bookmarks and your own notes.

INR 199 plus 18% GST. 90 days of online access. No auto-renewal.

Know what is included

Independent learning material from Vectametric. Not affiliated with or endorsed by the organisations behind the tools it teaches. Practice exams and projects are separate. Completing a course is not a professional certification.

Questions about courses

Are these video courses or reading courses?

The current courses use written lessons, examples and diagrams. Full Course, Revision and Cheat Sheet or Quick Reference views cover the same learning sequence at different levels of detail.

Which course should I start with?

Choose a Certification Course for a named exam, a Career Path Course for a role-led sequence, or a Skill Course for a focused subject. Read its level, prerequisites and curriculum before enrolling.

Do revision notes replace the full lessons?

No. Start with the full explanations, then use revision notes to refresh your understanding. Cheat sheets are concise study references, not a substitute for learning or permission to use notes during an official exam.

Are practice exams and projects included?

No. Course access, practice-exam bundles and project access are separate. An official certification, exam booking or voucher is not included.

How long do I have access?

The course page and checkout show the current online access period and price, including free enrollment where offered. Access starts when enrollment is confirmed and does not auto-renew.

Can I read lessons before enrolling?

Yes. Each course opens its first lessons to read without an account, and some courses are open in full. The course curriculum marks the lessons you can read now. Course access adds the remaining lessons, the Revision and Cheat Sheet or Quick Reference views, saved progress, bookmarks and personal notes.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy