Month 3 — Exercises set
🟢 Easy
PyTorch Basics
- Create 5 tensors of different shapes and output their shape, dtype, device attributes.
- Compute gradients for simple functions with
requires_grad=True. - Create an
nn.Modulesubclass — input → 3 hidden → output.
Training
- MLP 95%+ accuracy on MNIST.
- Compare optimizers: SGD, SGD+momentum, Adam, AdamW.
- Try learning rates 1e-1, 1e-3, 1e-5 to see the effect.
CNN
- Train SimpleCNN on CIFAR-10 (5 epochs).
- Load pretrained ResNet-18, classify an ImageNet image.
- Create an augmentation pipeline with
torchvision.transforms.
RNN/LSTM
- Compare
nn.RNN,nn.LSTM,nn.GRUon the same task. - Next-step forecasting for sin function.
- Create a Bidirectional LSTM, difference from plain LSTM.
🟡 Medium
Production-ready training
- Full training pipeline: Mixed precision + early stopping + checkpoint + W&B logging.
- Hyperparameter tuning: Optuna for a PyTorch model.
- Multi-GPU(using Colab Pro or Kaggle):
nn.DataParallel.
Transfer learning
- Flower classification: 102 types of flowers — pretrained EfficientNet, 92%+ accuracy.
- Custom domain: Collect your own images (phone camera), 5 classes, 50 images per class — use transfer learning.
- Few-shot learning: Try to get 90%+ accuracy with 5 images per class.
Time series
- Real stock data(yfinance): LSTM + sliding window forecasting.
- Multivariate: LSTM with multiple features (price, volume, indicators).
- Prophet vs LSTMcomparison.
Text
- IMDB sentiment: 85%+ accuracy with LSTM.
- News classification: 4-5 categories (AG News).
- Char-level language model: On Shakespeare or Uzbek text.
🔴 Hard
1. Production ML API
- Image classification (EfficientNet) FastAPI
- Multi-stage Dockerfile (build → runtime)
- Async batching (time and GPU optimization)
- Healthcheck, metrics endpoint
- Load test (with Locust): optimization that can sustain 100 req/s
2. Distributed training
- Kaggle Notebooks Pro or Colab Pro
- 2 GPUs with
DistributedDataParallel - Mixed precision + gradient accumulation
- Compare training time with single GPU
3. Model interpretation service
- Image classification with ResNet
- Endpoint that also returns Grad-CAM
- Streamlit or React UI
4. End-to-end CV pipeline
- Data: collecting images from the web (Selenium or API)
- Labelling (Label Studio or manual)
- Training (PyTorch + W&B)
- Deploying (FastAPI + Docker + Nginx)
- Monitoring (Prometheus + Grafana)
Mini-projects
Mini-project 1: Plant Disease Detector
- Dataset: PlantVillage (Kaggle)
- Transfer learning with 95%+ accuracy
- Mobile-friendly (TFLite or PyTorch Mobile)
- Streamlit demo
Mini-project 2: Real-time Pose Estimation
- MediaPipe or MMPose
- Webcam streaming
- WebSocket + FastAPI
Mini-project 3: Music Genre Classifier
- GTZAN dataset
- Mel-spectrogram + CNN
- FastAPI: audio upload → genre
Mini-project 4: Time Series Anomaly Detection
- Server metrics (CPU, RAM)
- LSTM autoencoder
- Real-time alert system
Quiz
Fundamentals
- How does backpropagation work (chain rule)?
- What is vanishing gradient and how is it solved?
- Relationship between batch size and learning rate?
- Why ReLU > Sigmoid (in modern NNs)?
- What does Dropout do during test?
PyTorch
- Difference between
model.eval()andtorch.no_grad()? - What does
state_dict()save? - Effect of
num_workersandpin_memoryinDataLoader? - When does mixed precision (AMP) help?
- Pros/cons of TorchScript and ONNX export?
CNN
- Why are 3x3 kernels widely used?
- When do you use Max vs Average pooling?
- Why is ResNet’s skip connection used?
- What is EfficientNet’s compound scaling?
- What is receptive field and how is it computed?
RNN
- Difference between RNN and Feedforward NN?
- LSTM gates and their roles?
- When does Bidirectional RNN help?
- Why gradient clipping is critical for RNN?
- Reasons for moving from RNN to Transformer?
✅ Month 3 final checklist
- Wrote a simple NN with pure NumPy
-
nn.Moduleand training loop in PyTorch - Familiarity with TensorFlow/Keras
- Image classification with CNN (CIFAR-10 or similar)
- Transfer learning (with pretrained model)
- Sequence task with RNN/LSTM (time series or text)
- Experiment tracking in W&B or TensorBoard
- DL model serving in FastAPI (CPU or GPU)
- Capstone project on GitHub
- LinkedIn post
Congratulations! Moving on to Month 4 — Computer Vision + NLP.