Observed since 20 Oct, 18:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
High-performance PyTorch plugin for tracking and analyzing intermediate neural network activations
Jan Miksa @ IDEAS Research Institute
High-performance PyTorch activation tracker with online reduction functionality for efficient model analysis.
Built on Python + C++ with native libtorch hooks and TorchScript (torch.jit.script) reductions compiled to .pt files.
Key Benefits
StoragePolicy, ReductionPolicy, CapturePolicy, CaptureMode) let you balance memory, compute, and I/O.StoragePolicy.DISK) — activations are written directly from C++ to disk. Ideal for long-running training loops with very large models. Activations are read back on demand from .dat files.Every tracked layer stores full activations by default — no registration needed:
import activationscope
with activationscope.ActivationScope().track(model) as tracker:
for x, y in dataloader:
out = model(x)
loss.backward()
acts = tracker.activations # {layer_name: [Tensor, ...]} across all batches
| Approach | ms/forward | Overhead vs baseline | Data captured |
|---|---|---|---|
| No tracking | 2.05 | — | — |
| Naive Python hooks | 3.13 | +52.7% | 594 MiB |
| ActivationScope | 2.65 | +29.2% | 594 MiB |
Run it yourself:
# Toy model (fast, GPU or CPU)
PYTHONPATH=. python -m benchmark.runner
# Pretrained ResNet-18 (requires torchvision)
PYTHONPATH=. python -m benchmark.runner --model resnet18
For detailed usage instructions, see the Usage Documentation.
Documentation and developer setup information is available in Development Documentation.
The design document outlining the architecture and implementation details can be found in Design Documentation.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.4 | 25 Jun 2026 | 6 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 18:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e9ff1f65b7a01f2d38ed41a6a94157ac57066b8a6c24eca99a36274fd7b541d1