What deep learning is & when to use it
Deep learning is a branch of machine learning that uses neural networks with many layers to learn useful representations directly from raw data. Instead of an analyst hand-crafting features such as "average bill value" or "number of red pixels", a deep network discovers its own features, layer by layer. The first layers of an image model learn edges, the middle layers learn textures and shapes, and the last layers learn whole objects like a samosa or a gulab jamun.
How it fits into AI and ML
| Level | What it means | Typical example |
|---|---|---|
| Artificial Intelligence | Any technique that makes machines act intelligently | Chess engine, rule-based chatbot |
| Machine Learning | Systems that learn patterns from data | Random forest predicting loan default |
| Deep Learning | ML with multi-layer neural networks | Speech-to-text for Hindi, face unlock |
So every deep learning model is an ML model, but not every ML model is deep learning.
Why it took off after 2012
Neural networks date back to the 1950s, yet they only became dominant recently because three things arrived together:
- Data – billions of photos, reviews and transactions (think of UPI's monthly volumes).
- Compute – GPUs that multiply large matrices in parallel, now rentable by the hour on cloud platforms.
- Better techniques – ReLU activations, dropout, batch normalisation, residual connections and the Adam optimizer made deep networks trainable.
Where deep learning wins
- Images and video – crop disease detection from phone photos, defect detection on a textile loom, number-plate reading at toll plazas.
- Text – sentiment of Flipkart reviews, translation between Tamil and English, document classification for insurance claims.
- Audio – voice assistants in regional languages, call-centre transcription.
- Complex sequences – demand forecasting across thousands of SKUs where patterns interact.
The common thread is unstructured, high-dimensional data where hand-made features are hard to design.
When NOT to use deep learning
For a CSV with 5,000 rows and 20 columns — say, customer churn for a Pune gym — gradient-boosted trees (XGBoost, LightGBM) or even logistic regression usually match or beat a neural network, train in seconds and are easier to explain to a manager. Choose deep learning only when at least one of these is true:
- the input is images, audio, free text or long sequences;
- you have (or can borrow via transfer learning) lots of data;
- accuracy gains justify extra cost in compute, engineering and explainability.
Your toolkit
This course uses PyTorch 2.x, the most popular research and production framework. Install it (CPU build shown; pick the CUDA build from pytorch.org if you have an NVIDIA GPU):
python -m venv dl-env
source dl-env/bin/activate
pip install torch torchvision
Then check what hardware PyTorch can see:
import torch
print("PyTorch version:", torch.__version__)
if torch.cuda.is_available():
device = "cuda"
elif torch.backends.mps.is_available(): # Apple Silicon
device = "mps"
else:
device = "cpu"
print("Training will run on:", device)
No GPU? Google Colab and Kaggle Notebooks give free GPU hours that are enough for every exercise here.
The deep learning workflow
- Frame the problem (classification, regression, generation) and pick a metric.
- Collect and label data; split into train, validation and test sets.
- Build a data pipeline that loads and augments batches.
- Choose an architecture — often a pretrained one.
- Train, watch validation metrics, tune.
- Evaluate once on the untouched test set.
- Export, deploy and monitor.
Each lesson in this track covers one of these steps in depth.
Key takeaways
- Deep learning = many-layer neural networks that learn features automatically.
- It dominates on images, text, audio and long sequences.
- For small tabular data, tree-based models are usually the better first choice.
- Data quality and a clear metric matter more than a fancy architecture.
Practice
List three problems at your workplace or college (for example, sorting product photos, reading handwritten forms, forecasting daily sales). For each, write down the data type, the rough number of examples available, and whether you would try deep learning or a classic ML model first — with one sentence justifying the choice. Then install PyTorch and run the device-check script above.