tf-slim
TensorFlow-Slim: A lightweight library for defining, training and evaluating complex models in TensorFlow
Decision gist · record as of 2026-08-14
Yes, if you are working with TensorFlow 1.x or early TensorFlow 2.x and need to reduce model-definition boilerplate. No, if you are starting a new project—modern TensorFlow and Keras provide equivalent or superior APIs natively. The package is stable and permissively licensed, but has not been updated since 2020 and may not be compatible with the latest TensorFlow versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires TensorFlow 1.15.2 or TensorFlow 2.0–2.2; compatibility with TensorFlow versions beyond 2.2 is unverified.
- Low friction to install; depends only on absl-py.
- Maintenance is active with recent commits, though the latest release was 2020-05-07 and the package has not received updates for several years despite the repository remaining active.
License · maintenance · safety
Apache 2.0 (permissive) — Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2020-05-07 (2290 days) · last repo commit 2026-07-02 · 373 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 132,995 downloads/mo, #11,532 on PyPI
Alternatives
Verify before relying
pip install tf-slim
import tf_slim as slim
# Define a model using slim layers and variables
weights = slim.model_variable('weights', shape=[10, 10, 3, 3], initializer=tf.truncated_normal_initializer(stddev=0.1), regularizer=slim.l2_regularizer(0.05))- Whether version 1.1.0 remains compatible with current TensorFlow releases beyond those tested (TF 1.15.2, 2.0.1, 2.1, 2.2)
- Current status of pre-built models (VGG, AlexNet) and whether they are maintained or deprecated
- Whether this package is still recommended for new projects or superseded by native TensorFlow APIs
- Specific code examples and their expected outputs to verify current functionality
What it is and what it does
TensorFlow-Slim is a lightweight library that sits on top of TensorFlow to reduce boilerplate when building neural networks. It provides argument scoping to set default parameters across operations, high-level layer definitions, variable management utilities that distinguish between model and non-model variables, and pre-built implementations of popular computer vision architectures like VGG and AlexNet. It also includes training and evaluation routines, loss functions, metrics, regularizers, and data-loading utilities.
You use it by importing as `tf_slim` and calling its layers and utilities instead of writing raw TensorFlow operations. It is designed to mix freely with native TensorFlow code, so you can adopt it incrementally. The library targets developers building convolutional neural networks and other deep learning models who want to reduce repetitive code and improve readability.
Use it for
- Define convolutional neural networks compactly using slim layers instead of native operations
- Reuse pre-trained VGG or AlexNet models as starting points or feature extractors for transfer learning
- Manage model variables separately from training variables for easier checkpoint saving and loading
- Apply regularization and common loss functions without writing custom code
- Train models with built-in learning routines and evaluate using standard metrics
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are working with TensorFlow 1.x or early TensorFlow 2.x and need to reduce model-definition boilerplate.
No, if you are starting a new project—modern TensorFlow and Keras provide equivalent or superior APIs natively. The package is stable and permissively licensed, but has not been updated since 2020 and may not be compatible with the latest TensorFlow versions.
Install
tf-slim on PyPI
Before you install
Low friction to install; depends only on absl-py. Maintenance is active with recent commits, though the latest release was 2020-05-07 and the package has not received updates for several years despite the repository remaining active.
Requires TensorFlow 1.15.2 or TensorFlow 2.0–2.2; compatibility with TensorFlow versions beyond 2.2 is unverified.
License in practice
Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install tf-slim
import tf_slim as slim
# Define a model using slim layers and variables
weights = slim.model_variable('weights', shape=[10, 10, 3, 3], initializer=tf.truncated_normal_initializer(stddev=0.1), regularizer=slim.l2_regularizer(0.05))
Verify before relying
- Whether version 1.1.0 remains compatible with current TensorFlow releases beyond those tested (TF 1.15.2, 2.0.1, 2.1, 2.2)
- Current status of pre-built models (VGG, AlexNet) and whether they are maintained or deprecated
- Whether this package is still recommended for new projects or superseded by native TensorFlow APIs
- Specific code examples and their expected outputs to verify current functionality
Package facts
| License | Apache 2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageabsl-py |
| Maintenance | Actively maintained 2,290 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 132,995 / month, #11,532 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: tf_slim-1.1.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “tensorflow model definition”
- tf-slimTensorFlow-Slim provides high-level layers, variable management, and…
- tensorflow-recommendersTensorFlow Recommenders provides a Keras-based library for building…
- tensorflow-hubDownloads and loads pre-trained TensorFlow SavedModels from…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also tf-keras-nightly · thinc · tensorflow · tensorflow-addons · tensorflow-graphics · tf-keras · tensorflow-recommenders · tf2crf · docker-squash · NeuralFoil