Deep Learning
Notebooks · TensorFlow · Hugging Face
Deep learning, one notebook at a time.
My study notes on deep learning, kept as a website so I can review them anywhere, even on my phone. They start with a single tensor and build up to CNNs, LSTMs and transformer embeddings. Every notebook keeps its code and output, and opens in Colab so you can run it yourself.
The learning path
Track 15 notes
Tensor foundations
What a tensor is, how to shape and combine tensors, and how TensorFlow computes gradients.
Track 22 notes
First neural networks
Linear regression as a one-neuron network, then what extra layers do, and don't, buy you.
Track 32 notes
Projects
End-to-end projects: review sentiment with LSTMs, and vegetable photos with CNNs and transfer learning.
Track 43 notes
Language and embeddings
Word2Vec, Hugging Face transformers, and sentence embeddings for text classification.
No matching items
All notes
Track 4 · 3
Language and embeddings
Representation Models for Text Classification
BERT out of the box scores 80%; its embeddings plus logistic regression, 85%; sentence-transformer embeddings, 87%.
Hugging FaceembeddingsNLPsentiment
Track 4 · 1
Language and embeddings
Word2Vec: From Word Similarities to Product Recommendations
Rebuild king − man + woman = queen with gensim, then reuse the same idea to recommend products from shopping baskets.
embeddingsWord2VecNLPrecommendations
Track 3 · 2
Projects
Vegetable Image Classification
Fifteen kinds of vegetable: from 62% with logistic regression to 100% test accuracy with MobileNetV2 transfer learning.
TensorFlowCNNtransfer learningcomputer vision
Track 1 · 4
Tensor foundations
TensorFlow Functions: stack, concat, expand_dims and gather
When to stack images into a batch, join batches together, add a dimension, or pick out channels.
TensorFlowtensors
Track 4 · 2
Language and embeddings
Hugging Face Basics: Sentiment Classification
Open up the pipeline (tokenizer, model, post-processing), then fine-tune DistilBERT and add custom layers on top.
Hugging FacetransformersNLPsentiment
Track 3 · 1
Projects
Amazon Reviews: Sentiment Classification
From an 84% TF-IDF random forest to a 91% bidirectional LSTM with attention, on 100,000 Amazon reviews.
TensorFlowNLPLSTMsentiment
Track 1 · 5
Tensor foundations
Gradient Descent from Scratch with GradientTape
First and second derivatives with tf.GradientTape, then a hand-written gradient descent loop that finds the minimum of y = x².
TensorFlowgradientsoptimisation
Track 1 · 3
Tensor foundations
Tensor Math Operations, Side by Side with NumPy
abs, argmax, reduce_max, reduce_sum, pow, log, exp and sqrt in TensorFlow and NumPy, and the one default that differs.
TensorFlowtensorsNumPy
Track 2 · 2
First neural networks
Shallow vs Multi-Layer Networks on Simulated Data
On 10,000 simulated rows, extra layers and activations never beat plain linear regression. Complexity has a cost.
TensorFlowKerasregressionactivations
Track 2 · 1
First neural networks
Linear Regression as a One-Layer Neural Network
Fit the diabetes dataset with scikit-learn's least squares and with a single Keras Dense layer, then compare the weights.
TensorFlowKerasregression
Track 1 · 2
Tensor foundations
TensorFlow Basics 2: Data Types and Broadcasting
TensorFlow's data types, and how broadcasting adds tensors of different shapes without copying data by hand.
TensorFlowtensorsbroadcasting
Track 1 · 1
Tensor foundations
TensorFlow Basics 1: Creating Tensors
Create, index, reshape and aggregate tensors, the NumPy-like building block of every TensorFlow model.
TensorFlowtensors
No matching items
More from Arun
Teaching, data stories and essays, on my other sites.