算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
core-snn【设计与创意】Teach and debug SpikingJelly activation-based core SNN modeling: step modes, state reset, surrogate gradients, neurons, layers, recurrent wrappers, monitors, and tiny timing/visualization helpers.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is to construct, inspect, or debug the core spikingjelly.activation_based object model for activation-based spiking neural networks.
base: step-mode-aware modules, state registration, memory extraction, functional conversion.functional: network-wide step-mode/reset/backend helpers and explicit forward wrappers.surrogate: Heaviside-based surrogate-gradient modules and gradient helpers.neuron: canonical IF/LIF/PLIF/PSN/FlexSN neurons and the main stateful neuron families.layer: step-aware stateless layers, recurrent wrappers, stateful synapse helpers, batch-norm variants, and attention wrappers.rnn: stacked spiking RNN cells and bidirectional wrappers.monitor: output/input/attribute/gradient monitors and GPU sampling.timing_based: GaussianTuning and Tempotron.visualizing: spike, voltage, and feature-map plotting helpers.configure and logger: package-level import-time config and logging behavior.from spikingjelly.activation_based import base, functional, surrogate, neuron, layer, rnn, monitorfrom spikingjelly.timing_based.encoding import GaussianTuningfrom spikingjelly.timing_based.neuron import Tempotronfrom spikingjelly import visualizingfrom spikingjelly import configurefrom spikingjelly.logger import loggerstep_mode='s') or multi-step (step_mode='m'). Use [N, *] for single-step inputs and [T, N, *] for time-major sequences.functional.reset_net(net). If the model structure changes, invalidate the reset cache first with functional.invalidate_reset_cache(net).SimpleBaseNode when you want the readable charge/fire/reset path, or BaseNode when you want explicit functional transitions and backend-aware kernels.scripts/minimal_core_smoke.py: tiny no-download smoke for a mixed IF/LIF network, functional.reset_net, functional.set_step_mode, and monitor/surrogate checks.Consulted source files:
spikingjelly/activation_based/base.pyspikingjelly/activation_based/functional/net_config.pyspikingjelly/activation_based/functional/forward.pyspikingjelly/activation_based/functional/layer.pyspikingjelly/activation_based/functional/neuron.pyspikingjelly/activation_based/functional/misc.pyspikingjelly/activation_based/surrogate.pyspikingjelly/activation_based/neuron/base_node.pyspikingjelly/activation_based/neuron/integrate_and_fire.pyspikingjelly/activation_based/neuron/lif.pyspikingjelly/activation_based/neuron/plif.pyspikingjelly/activation_based/layer/container.pyspikingjelly/activation_based/layer/stateless_wrapper.pyspikingjelly/activation_based/layer/bn.pyspikingjelly/activation_based/layer/misc.pyspikingjelly/activation_based/rnn.pyspikingjelly/activation_based/monitor.pyspikingjelly/timing_based/encoding.pyspikingjelly/timing_based/neuron.pyspikingjelly/visualizing/*.pyspikingjelly/configure.pyspikingjelly/logger.pyConsulted docs:
docs/source/tutorials/en/basic_concept.rstdocs/source/tutorials/en/neuron.rstdocs/source/tutorials/en/surrogate.rstdocs/source/tutorials/en/monitor.rstdocs/source/tutorials/en/recurrent_connection_and_stateful_synapse.rstdocs/source/APIs/spikingjelly.activation_based.rstdocs/source/APIs/spikingjelly.activation_based.base.rstdocs/source/APIs/spikingjelly.activation_based.functional.rstdocs/source/APIs/spikingjelly.activation_based.neuron.rstdocs/source/APIs/spikingjelly.activation_based.neuron.core.rstdocs/source/APIs/spikingjelly.activation_based.neuron.research.rstdocs/source/APIs/spikingjelly.activation_based.surrogate.rstdocs/source/APIs/spikingjelly.activation_based.monitor.rstdocs/source/APIs/spikingjelly.activation_based.rnn.rstdocs/source/APIs/spikingjelly.timing_based.rstdocs/source/APIs/spikingjelly.visualizing.rstdocs/source/APIs/spikingjelly.configure.rstdocs/source/APIs/spikingjelly.logger.rstConsulted tests:
test/test_configure.pytest/activation_based/test_functional.pytest/activation_based/test_functional_layer.pytest/activation_based/test_functional_neuron.pytest/activation_based/test_monitor.pytest/activation_based/test_neuron_variants.pytest/activation_based/test_rnn.pytest/test_visualizing.pytest/timing_based/test_encoding.pytest/timing_based/test_neuron.pytest/test_logging_policy.pyVerified live-signature evidence:
skills/tests/spikingjelly/reports/environment/repo_env_report.json confirms Python 3.11, installed spikingjelly 2.0.0.dev1, and required CPU/CUDA/CuPy/Triton/NIR/transformers imports.