tf-estimator-tutorials: GoogleCloudPlatform's Jupyter Notebooks for the TensorFlow Estimator API
This repository includes tutorials on how to use the TensorFlow estimator APIs to perform various ML tasks, in a systematic and standardised way
At a glance
- What is it?
- GoogleCloudPlatform's tf-estimator-tutorials is an Apache 2.0 Jupyter Notebook collection that teaches the TensorFlow Estimator API through eight ML task categories, including classification, regression, clustering, sequence models, and text analysis. The Estimator API has been deprecated in TF 2.x, which makes this repository most useful as historical reference or for maintaining legacy pipelines built on that API.
- Who is it for?
- Engineers who maintain legacy TensorFlow code built on the Estimator API will find this repository a useful reference for input pipeline patterns, feature column definitions, and the train_and_evaluate workflow. New projects should use Keras instead; the README's Coming Soon section (early stopping, Keras examples) was never completed, and the Estimator API itself was marked deprecated in TF 2.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 145 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What tf-estimator-tutorials Covers and Who Should Use It
This repository is a structured set of Jupyter Notebooks published by GoogleCloudPlatform that walks through the TensorFlow Estimator API across eight ML task categories. The README describes the goal as covering various ML tasks in a systematic and standardised way.
The primary audience today is engineers maintaining existing TensorFlow pipelines that were built using the Estimator API before TF 2.x deprecated it. The repository is also useful for ML practitioners who need to understand the design patterns behind Estimators, such as canned estimators, custom model functions, and the experiment API, when reading or debugging older Google Cloud ML code.
The notebooks are organized by task rather than by technique: there is a folder for regression, one for classification, one for clustering, one for time-series, and so on. Each folder works as a self-contained study unit.
The TF Estimator API and Its Current Deprecation Status
The TensorFlow Estimator API was a high-level abstraction introduced in TF 1.x that standardized training, evaluation, and model export under a single interface. A canned estimator (such as DNNClassifier or LinearRegressor) required only a feature column specification and a training input function; a custom estimator required writing a model_fn that returned an EstimatorSpec.
In TF 2.x, Estimators were kept for compatibility but deprecated in favor of Keras. As of TF 2.16 and later, tf.estimator raises an AttributeError in many installations, which is exactly what users searching for Module tensorflow has no attribute estimator are encountering.
This means the notebooks in this repository do not run unchanged on a current TensorFlow installation. To reproduce the original outputs, you need either TF 1.x or the separate tf-estimator package. The repository's requirements.txt specifies only tensorflow without a version pin, which does not protect against this. The README does not address the deprecation.
Repository Layout and Task Coverage
The repository organizes notebooks by task type in numbered directories:
00_Miscellaneous/
01_Regression/
02_Classification/
03_Clustering/
04_Times_Series/
05_Autoencoding/
06_Sequence_ Models/
07_Image_Analysis/
08_Text_Analysis/Clustering uses k-means. Time-series uses autoregressive models and includes a RandomWindowInputFn and WholeDatasetInputFn for windowed sequence reading. Dimensionality reduction is covered through an autoencoding notebook. Sequence models use RNNs and LSTMs. Image analysis demonstrates CNN-based image classification. Text analysis covers text classification with embeddings, CNNs, and RNNs.
Beyond task types, the repository demonstrates a metadata-driven approach to feature column construction: the same Python functions build numerical columns, categorical columns with vocabulary, categorical columns with hash buckets, and categorical columns with identity, using configuration rather than hardcoded logic.
An Experimental/ directory exists outside the numbered task folders and is not documented in the README.
Input Pipelines, Feature Engineering, and Wide-and-Deep Models
One of the most detailed parts of the repository is its treatment of data input pipelines. The README lists three mechanisms: tf.estimator.inputs.pandas_input_fn for reading Pandas DataFrames, tf.train.string_input_producer for lower-level queue-based reading, and tf.data.Dataset APIs for reading both CSV and TFRecords files.
Preprocessing operations shown in the input functions include sin, sqrt, polynomial expansion, Fourier transform, log, boolean comparisons, Euclidean distance, and custom formulas. These transformations happen inside the input_fn, not as a separate preprocessing layer.
The repository also covers the Wide and Deep (DNN Linear Combined) model pattern, which combines sparse (wide) and dense (deep) feature columns. The normalizer_fn parameter in numeric_column() handles Min-Max and Standard scaling using precomputed statistics. The weight_column parameter appears in both canned estimators and in the custom loss function in custom estimator examples.
For TF 1.7-era features, separate notebooks demonstrate tf.Transform for preprocessing, TensorFlow Model Analysis (TFMA) for model quality assessment, and tf.Hub for text feature column embeddings.
Getting the Notebooks Running
The repository provides an INSTALL.md for environment setup. The requirements.txt lists the direct dependencies:
pip install tensorflow jupyter ipdb google-api-python-client oauth2client requests shAfter installing, start the Jupyter server from the repository root. The browser interface opens and you can navigate to any numbered task directory to open the .ipynb notebook file. The README notes that tf.Transform and TFMA features require TF 1.7 specifically.
Given the deprecation of tf.estimator, installing a version-pinned TensorFlow is strongly advisable. The requirements.txt does not specify a version, so a bare pip install tensorflow will fetch a current release where tf.estimator may not be available without the separate tf-estimator compatibility package.
Where This Repository Falls Short
The Coming Soon section in the README lists items that were never delivered: early stopping, DynamicRnnEstimator with variable-length sequences, Collaborative Filtering for recommendation, topic models for text, and Keras examples. The last push was on 2026-05-08 and the repository has no GitHub releases, suggesting no further additions are planned.
The absence of version pinning in requirements.txt is a practical problem: anyone running pip install tensorflow on a current environment will almost certainly get a version where the Estimator API is gone or requires a separate installation step. For a tutorial repository, this makes most notebooks non-functional out of the box.
The notebooks were designed for TF 1.x patterns. They do not use eager execution (TF 2's default), do not demonstrate tf.function, and do not show how the same ML tasks look in the Keras API that replaced them. As a result, the code style will be unfamiliar to developers who learned TensorFlow after TF 2.0.
Keras as the Current TensorFlow Alternative
Keras is now the official high-level API for TensorFlow and is the approach all new TensorFlow documentation uses. Where the Estimator API required a model_fn returning an EstimatorSpec and a separate input_fn, Keras uses model.fit() with a tf.data.Dataset pipeline and a model defined through the sequential or functional API.
For the task types covered in tf-estimator-tutorials, Keras equivalents exist in the official TF documentation and in the Keras documentation. The feature column API that this repository demonstrates in detail has been partially replaced by tf.keras.layers.experimental.preprocessing layers and Keras preprocessing utilities, though the full feature column API still exists in TF 2.x for backward compatibility.
Developers who want to learn modern TensorFlow should go directly to Keras tutorials rather than this repository. Those who need to read or extend legacy Estimator-based code will find tf-estimator-tutorials a useful reference for the original design patterns.
Editorial conclusion
Engineers who maintain legacy TensorFlow code built on the Estimator API will find this repository a useful reference for input pipeline patterns, feature column definitions, and the train_and_evaluate workflow. New projects should use Keras instead; the README's Coming Soon section (early stopping, Keras examples) was never completed, and the Estimator API itself was marked deprecated in TF 2. Anyone who follows these notebooks on a current TensorFlow installation will encounter the attribute error that appears in Google searches for this project: tf.estimator was removed from the public API. Run on TF 1.x or install the tf-estimator package separately to reproduce the original notebook outputs.
Frequently asked questions
Why does tf-estimator-tutorials give an AttributeError on current TensorFlow?
The TensorFlow Estimator API was deprecated in TF 2.x and removed from the default namespace in newer releases. To run these notebooks, use TF 1.x or install the separate tf-estimator compatibility package alongside a current TensorFlow.
What ML tasks does tf-estimator-tutorials cover?
The repository covers classification, regression, clustering (k-means), time-series with AR models, dimensionality reduction through autoencoding, sequence models with RNNs and LSTMs, image classification with CNNs, and text classification with embeddings, CNNs, and RNNs.
Does tf-estimator-tutorials include examples for the Keras API?
No. The README lists Keras examples under Coming Soon, but they were never added. The repository is entirely based on the TF Estimator and tf.data APIs from the TF 1.x era.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/googlecloudplatform-tf-estimator-tutorials)