Data Science ยท Chapter 37 of 43
Intro to Deep Learning
DEEP LEARNING uses multi-layer neural networks. It shines on images, audio and text where features are best learned automatically.
Common frameworks: PyTorch and TensorFlow/Keras.
Example 1 (python)
import torch
import torch.nn as nn
model = nn.Sequential(nn.Linear(10, 32), nn.ReLU(), nn.Linear(32, 1))A tiny PyTorch network.
Example 2 (python)
# CNNs โ images, RNNs/Transformers โ sequencesArchitecture matches data type.
Key points
- Multi-layer neural networks.
- Learns features automatically.
- Great for images, audio, text.
- Needs lots of data and compute.
๐ก Note: For tabular data, gradient boosting (XGBoost / LightGBM) still usually beats deep learning.
