← all repositories

archinetai/surgeon-pytorch

A PyTorch utility for inspecting intermediate model layers and extracting subparts without modifying original model code.

474 stars Python ML Frameworks
surgeon-pytorch
Velocity · 7d
+0.3
★ / day
Trend
steady
star history

Surgeon-pytorch is a library that enables inspection and extraction of intermediate layers in PyTorch models. It wraps models to capture layer outputs during forward passes, supporting multiple layers, removal of subgraphs, and extraction of model branches for independent use. The tool facilitates debugging, visualization of embeddings, and analysis of attention matrices without requiring changes to the original model implementation.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.