A 2017-vintage AlexNet finetuning kit that still teaches pipeline basics
Before Keras made finetuning trivial, this was the readable reference for wiring pretrained ImageNet weights into TensorFlow's then-new input pipeline.

What it does
This repo is a self-contained kit for finetuning AlexNet on your own image dataset using TensorFlow 1.2+. You bring pretrained weights (converted from Caffe or downloaded), point finetune.py at train.txt and val.txt files listing image paths and labels, and it handles the rest. A Jupyter notebook validates the base model against ImageNet first, so you know the weights loaded correctly before you start hacking layers.
The interesting bit
The real value isn’t the model—it’s the pedagogy. The author rewrote the whole thing to demonstrate TensorFlow’s new (in 2017) input pipeline, replacing OpenCV with native TF ops. The code is deliberately explicit: each file has one job (alexnet.py for graph definition, datagenerator.py for the pipeline wrapper, finetune.py for orchestration). If you’ve ever been mystified by how tf.data ancestors worked, this is a fossil record worth studying.
Key highlights
- Pretrained weight loading from Caffe-converted
.npyfiles, with a validation notebook to catch conversion errors early - TensorBoard summaries wired in for monitoring loss and accuracy during training
- Clean separation: model graph, data pipeline, and training loop live in separate files
- Minimal dependencies: Python 3, TensorFlow >= 1.2rc0, NumPy—nothing else
- Companion blog post walks through the entire codebase line by line
Caveats
- TensorFlow 1.x only; this predates eager execution and Keras integration
- AlexNet itself is largely obsolete for new work; modern architectures will outperform it with less tuning
- The author explicitly defers explanation to their blog post, so the README is more of a quick-start than documentation
Verdict
Worth a look if you’re maintaining legacy TF 1.x code, teaching deep learning from first principles, or trying to understand how data pipelines evolved. Skip it if you need state-of-the-art accuracy or are already committed to PyTorch/TF 2.x/Keras workflows.