# sicara/tf-explain

Interpretability Methods for tf.keras models with Tensorflow 2.x

Repository: https://github.com/sicara/tf-explain
Canonical: https://ross.abutalabs.com/products/tf-explain
Homepage: https://tf-explain.readthedocs.io
Language: Python
License: MIT
License Family: permissive
Topics: interpretability, deep-learning, tensorflow, tf2, keras, visualization, machine-learning
Last push: 2024-06-03T10:38:45+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2606, "days_push": 821, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1037, forks 110 (observed 2026-08-28T04:03:19.505925+00:00)

## What it is
tf-explain is a Python library implementing interpretability methods (Grad CAM, occlusion sensitivity, vanilla gradients, etc.) for tf.keras models as TensorFlow 2.x callbacks. It lets you explain neural network predictions either on trained models or during training with results logged to TensorBoard.

## Use cases
- explain why a keras image classifier made a prediction
- visualize grad cam heatmaps for a tensorflow model
- interpret neural network predictions during training
- apply occlusion sensitivity to a tf.keras model
- understand which image regions activate a CNN
- log interpretability visualizations to tensorboard

## When to choose
- you use TensorFlow 2.x / Keras and need explainability methods like Grad CAM or occlusion sensitivity
- you want interpretability visualizations both post-training and as training callbacks
- you prefer a lightweight pip-installable library over building explainability code yourself

## When to avoid
- you work with PyTorch or other frameworks - it is TensorFlow 2.x only
- you need explainability for NLP or tabular models - methods are image-focused
- you need actively developed features - the project is in maintenance mode with infrequent releases

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, data-visualization, deep-learning
- domain: deep-learning, machine-learning, computer-vision, data-visualization
- platform: python, cross-platform
- tags: interpretability, explainable-ai, tensorflow, keras, grad-cam, neural-network-visualization, callbacks, gpu

## Member repositories
- sicara/tf-explain (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:19.505925+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:04:24.481892+00:00, confidence not recorded.
  - readme: https://github.com/sicara/tf-explain (fetched 2026-08-28T04:03:19.505925+00:00, sha c2a8a5c86b13)
  - registry_pypi: https://pypi.org/pypi/tf-explain/json (fetched 2026-08-29T13:06:05.807194+00:00, sha bae4d144bf23)
- Data as of 2026-08-30T08:39:29.467469+00:00.
