Hands On "AI Engineering"

Hands On "AI Engineering"

180-Day AI and Machine Learning Course from Scratch

Week 21-22 : Deep Learning with TensorFlow & PyTorch (Days 141-154)

Jul 25, 2026
∙ Paid

Introduction

Notebook lessons teach tensors, Keras Sequential, PyTorch nn.Module, and CIFAR-10 pipelines in isolation. A platform team needs the opposite: one service that runs curriculum demos for learning, a product API for experiments and async training, and a core library that both surfaces import—without duplicating model code across fourteen days.

This project composes Days 141–147 into a single stack: week2122_python (TensorFlow + PyTorch cores), FastAPI with Learning and Vision APIs, Postgres-backed runs, a React dashboard on port 3000, and HTTP 501 stubs for Days 148–154 until lesson code lands.

Takeaway: You will see how to unify two deep-learning frameworks behind one vision engine, expose them through intentional API layers, and keep long training off the request thread.

System Overview

Four bands carry the design:

  • React + Nginx (port 3000) — unified pipeline, curriculum studio, operations monitor with live metrics polling.

  • FastAPI (port 8000) — /api/v1/week2122/learn/day{N}/... for Days 141–147 demos; /api/v1/vision/... for experiments, Iris comparison, and CIFAR jobs; lesson aliases at /api/v1/learn/lesson-{N}/.

  • week2122_python core — core/tensorflow/ (tensors, autodiff, Iris Sequential, MNIST, CIFAR-10 tf.data), core/pytorch/ (tensors, autograd, tabular nets), core/vision_engine/pipeline.py (product composition), core/runtime/write_gate.py (Day 145 freeze pattern).

  • Postgres + Alembic — experiments, runs, artifacts; background CIFAR training via cifar_train_job.py and asyncio.to_thread.

Day 141–143 material surfaces as TensorFlow learning routes and MNIST smoke tests. Days 144–146 feed PyTorch learning routes and the Iris compare product endpoint. Day 147 drives CIFAR baseline training and experiment registration.

Engine / Core System Design

The core package owns tensors, training loops, and evaluation metrics. The backend owns HTTP, SQLAlchemy repositories, and job scheduling. Routes validate caps from settings (max epochs, batch limits) and delegate synchronously or enqueue work.

User's avatar

Continue reading this post for free, courtesy of AI Engineering.

Or purchase a paid subscription.
© 2026 Systemdr, Inc. · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture