--- id: tf-slim version: "1.1.0" license: Apache 2.0 license_treatment: permissive maintenance: active --- # tf-slim — TensorFlow-Slim: A lightweight library for defining, training and evaluating complex models in TensorFlow License: permissive · Maintenance: active · Downloads: 133.0K/mo ## 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 above — verify before relying. TensorFlow-Slim provides high-level layers, variable management, and training utilities that simplify defining, training, and evaluating neural network models in TensorFlow. 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 pip install tf-slim uv add tf-slim poetry add tf-slim ## Installing tf-slim 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. 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)) Requires TensorFlow 1.15.2 or TensorFlow 2.0–2.2; compatibility with TensorFlow versions beyond 2.2 is unverified. 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: unspecified - Install friction: low - Maintenance: active - Downloads: 133.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tensorflow model definition, neural network layers tensorflow, tensorflow training utilities, deep learning model building, tensorflow regularization, computer vision models tensorflow, tensorflow, neural-networks, computer-vision [View on SkillFed](https://skillfed.io/packages/tf-slim) · [View on PyPI](https://pypi.org/project/tf-slim/)