spikingjelly.activation_based.memopt package#
本子包提供了减少 spikingjelly.activation_based 模型训练显存开销的工具。详情请参阅我们在 ICLR 2026 上发表的论文 Towards Lossless Memory-efficient Training of Spiking Neural Networks via Gradient Checkpointing and Spike Compression 以及 源代码仓库 。
This package provides tools for reducing training memory consumption of spikingjelly.activation_based models. See our ICLR 2026 paper Towards Lossless Memory-efficient Training of Spiking Neural Networks via Gradient Checkpointing and Spike Compression and source code repository for details.
Optimization Pipeline#
基于梯度检查点和脉冲压缩的深度SNN训练显存自动优化工具。
Automatic memory optimization pipeline for deep SNN training based on gradient checkpointing and spike compression.
The main API. Perform memory optimization on a model. |
|
Structured summary returned by |
|
|
Supported high-level memopt presets. |
Get the device of the current process. |
|
Apply GC to a submodule. |
|
Get a module and its parent module given its path. |
Gradient Checkpointing Tools#
用于实现带输入压缩的梯度检查点 (GC) 的工具。
Tools for implementing gradient checkpointing (GC) with input compression.
Whether in the first forward pass of GC. |
|
Query autocast information. |
|
Wrap a function with GC and input compression. |
|
Module container representing a GC segment. |
|
Module container representing a temporally chunked GC segment. |
Spike Compressors#
将浮点数表示的脉冲张量转换为更紧凑的表示形式的压缩器。
Compressors that convert spike tensors represented in floating-point numbers into more compact representations.
Base class for spike compressors. |
|
Do not perform any compression/decompression. |
|
Convert spike tensors to/from boolean tensors. |
|
Convert spike tensors to/from |
|
Converts spike tensors to/from bit representations. |
|
Convert spike tensors to/from sparse representations. |