// the take
A small reference repo with worked examples of freezing a TensorFlow 1.x graph into a single .pb file and running inference from it, plus a TF 2.x equivalent built on tf.function and convert_variables_to_constants_v2. It's for someone maintaining legacy TF1 model-serving code or who just wants to see the raw API calls behind the frozen-graph pattern without a wrapper library in the way.
Each example is short and self-contained (cnn.py/main.py for v1, example_1/2.py for v2), so you can read the whole flow in one sitting instead of digging through a framework. It uses the actual low-level calls (GraphDef, tf.io.gfile, convert_variables_to_constants_v2) directly, so you see exactly what freezing a graph does rather than a black-box helper. The companion blog posts fill in the narrative the terse code leaves out.
No commits since December 2020, and TF2's SavedModel/ConcreteFunction APIs have moved on since then, so the v2 example may not match current TF behavior without adjustment. There's no requirements.txt or pinned TensorFlow version, so there's no guarantee which TF release the examples were actually run against. No tests or CI, so there's nothing to catch breakage from a TF upgrade. Frozen graphs themselves are a dead end for production serving — they lack the signatures and metadata SavedModel carries, so this pattern doesn't translate to TF Serving or TFLite conversion workflows.
We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →