# philipperemy/keract

Layers Outputs and Gradients in Keras. Made easy.

Repository: https://github.com/philipperemy/keract
Canonical: https://ross.abutalabs.com/products/keract
Language: Python
License: MIT
License Family: permissive
Topics: keras, keras-neural-networks, keras-tutorials, keras-visualization, deep-learning, visualize-activations, mnist, multi-inputs, machine-learning
Last push: 2025-04-07T02:04:56+00:00

## Health v2 (maintenance only)
Score: 30/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 15, release rhythm 8, longevity 100
- inputs: {"age_days": 3395, "days_push": 514, "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 1059, forks 187 (observed 2026-08-28T04:03:25.575313+00:00)

## What it is
Keract is a Python library that extracts layer activations (outputs) and gradients from TensorFlow/Keras models as NumPy arrays, with helpers to display them as images or heatmaps. It supports popular pretrained models and persists results to JSON.

## Use cases
- get activations of each layer of a keras model
- visualize cnn layer outputs as heatmaps
- compute gradients of activations in tensorflow
- debug why my neural network layer outputs look wrong
- inspect lstm layer activations
- export keras layer outputs to json

## When to avoid
- you are on TensorFlow 2.16+ or Keras 3, which is not supported
- your model relies heavily on nested models
- you need maintained, actively developed tooling

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, data-visualization, deep-learning
- domain: deep-learning, machine-learning, data-visualization
- platform: python
- tags: keras, tensorflow, activations, gradients, neural-network-introspection, heatmaps

## Member repositories
- philipperemy/keract (main) score 30

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:25.575313+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-30T06:57:21.416809+00:00, confidence not recorded.
  - readme: https://github.com/philipperemy/keract (fetched 2026-08-28T04:03:25.575313+00:00, sha 7c43c4a098d7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
