Registry / ai-ml / tf-slim

tf-slim

JSON →
library1.1.0pypypiunverified

TF-Slim is a lightweight library for defining, training, and evaluating complex models in TensorFlow. The current version is 1.1.0, with no recent updates and likely in maintenance mode.

pip install tf-slim
INSTALL
IMPORT
SIG · TF-SLIM
T
tf-slim
ai-mlpythonv1.1.0
Install
1.9s avg
Import
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 22.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 23MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

slim
import tf_slim as slim
import tf_slim as slim

Load a pretrained ResNet-50 model using TF-Slim's model zoo.

import tensorflow as tf import tf_slim as slim inputs = tf.random.normal([4, 224, 224, 3]) nets = tf_slim.nets.resnet_v2 with slim.arg_scope(nets.resnet_arg_scope()): logits, _ = nets.resnet_v2_50(inputs, num_classes=1000, is_training=False) print(logits.shape)
Debug
Known issues
breakingTF-Slim was part of TensorFlow contrib, which was removed in TF 2.0. The standalone tf-slim package must be installed separately.
fix
Install tf-slim with pip and use 'import tf_slim as slim' instead of 'tensorflow.contrib.slim'.
affects: >=2.0.0
gotchaTF-Slim's TF 1.x APIs (e.g., slim.layers, slim.losses) are not fully compatible with eager execution. You may need to run inside tf.Graph().as_default() or disable eager execution.
fix
Use tf.compat.v1.disable_eager_execution() at the start of your script or wrap code in a graph context.
affects: all
deprecatedMany TF-Slim functions (e.g., slim.learning, slim.evaluation) are deprecated in favor of TensorFlow native APIs like tf.keras or tf.estimator.
fix
Consider migrating to tf.keras for model building and tf.train.Checkpoint/tf.function for training.
affects: >=1.1.0
Upgrade
Version history
1.1.0latest on PyPI · released May 7, 2020
Audit
Dependencies
tensorflowrequiredRequired runtime dependency
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
tf-slim — pip install tf-slim · libregistry