[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-jeshraghian--snntorch":3,"tool-jeshraghian--snntorch":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",153609,2,"2026-04-13T11:34:59",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":77,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":94,"forks":95,"last_commit_at":96,"license":97,"difficulty_score":98,"env_os":99,"env_gpu":100,"env_ram":99,"env_deps":101,"category_tags":110,"github_topics":112,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":123,"updated_at":124,"faqs":125,"releases":155},7118,"jeshraghian\u002Fsnntorch","snntorch","Deep and online learning with spiking neural networks in Python","snntorch 是一个专为脉冲神经网络（SNN）设计的 Python 开源库，旨在让开发者能够像使用传统深度学习框架一样轻松构建和训练类脑模型。它基于 PyTorch 构建，将预定义的脉冲神经元模型无缝集成其中，使其能作为循环激活单元直接参与计算，从而充分利用 GPU 加速张量运算的优势。\n\n传统深度学习依赖连续数值激活，而人脑通过离散的“脉冲”传递信息，这种方式在能效上更具潜力。snntorch 解决了在现有主流框架中难以高效实现基于梯度的脉冲网络训练的痛点，支持在线学习与深度学习方法，并提供了从数据编码、损失函数计算到可视化的一站式工具链。其独特的亮点在于对自动微分（autograd）的深度支持，以及通过 NIR 标准实现与其他 SNN 库的模型互导互用，极大降低了研究门槛。\n\n这款工具非常适合人工智能研究人员、神经形态计算探索者以及希望尝试下一代低功耗 AI 模型的开发者使用。无论你是想复现前沿论文，还是从头设计类脑算法，snntorch 都能提供直观、灵活且强大的技术支撑，帮助你更专注于算法创新而非底层实现细节。","================\nIntroduction\n================\n\n.. |build| image:: https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Factions\u002Fworkflows\u002Fbuild.yml\u002Fbadge.svg\n   :target: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n\n.. |docs| image:: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fsnntorch\u002Fbadge\u002F?version=latest\n   :target: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n\n.. |discord| image:: https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F906036932725841941\n   :target: https:\u002F\u002Fdiscord.gg\u002FcdZb5brajb\n\n.. |pypi| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fsnntorch.svg\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fsnntorch\n\n.. |conda| image:: https:\u002F\u002Fimg.shields.io\u002Fconda\u002Fvn\u002Fconda-forge\u002Fsnntorch.svg\n   :target: https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Fsnntorch\n\n.. |downloads| image:: https:\u002F\u002Fstatic.pepy.tech\u002Fpersonalized-badge\u002Fsnntorch?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads\n   :target: https:\u002F\u002Fpepy.tech\u002Fproject\u002Fsnntorch\n\n.. |neuromorphiccomputing| image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCollaboration_Network-Open_Neuromorphic-blue\n   :target: https:\u002F\u002Fopen-neuromorphic.org\u002Fneuromorphic-computing\u002F\n\n|build| |docs| |discord| |pypi| |conda| |downloads| |neuromorphiccomputing|\n\n\nThe brain is the perfect place to look for inspiration to develop more efficient neural networks. One of the main differences with modern deep learning is that the brain encodes information in spikes rather than continuous activations. \nsnnTorch is a Python package for performing gradient-based learning with spiking neural networks.\nIt extends the capabilities of PyTorch, taking advantage of its GPU accelerated tensor \ncomputation and applying it to networks of spiking neurons. Pre-designed spiking neuron models are seamlessly integrated within the PyTorch framework and can be treated as recurrent activation units. \n\n\n.. image:: https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fdocs\u002F_static\u002Fimg\u002Fspike_excite_alpha_ps2.gif?raw=true\n        :align: center\n        :width: 800\n\nIf you like this project, please consider starring ⭐ this repo as it is the easiest and best way to support it.\n\nIf you have issues, comments, or are looking for advice on training spiking neural networks, you can open an issue, a discussion, or chat in our `discord \u003Chttps:\u002F\u002Fdiscord.gg\u002FcdZb5brajb>`_ channel.\n\nsnnTorch Structure\n^^^^^^^^^^^^^^^^^^^^^^^^\nsnnTorch contains the following components: \n\n.. list-table::\n   :widths: 20 60\n   :header-rows: 1\n\n   * - Component\n     - Description\n   * - `snntorch \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.html>`_\n     - a spiking neuron library like torch.nn, deeply integrated with autograd\n   * - `snntorch.export_nir \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.export_nir.html>`_\n     - enables exporting to other SNN libraries via `NIR \u003Chttps:\u002F\u002Fnnir.readthedocs.io\u002Fen\u002Flatest\u002F>`_\n   * - `snntorch.functional \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.functional.html>`_\n     - common arithmetic operations on spikes, e.g., loss, regularization etc.\n   * - `snntorch.import_nir \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.import_nir.html>`_\n     - enables importing from other SNN libraries via `NIR \u003Chttps:\u002F\u002Fnnir.readthedocs.io\u002Fen\u002Flatest\u002F>`_\n   * - `snntorch.spikegen \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.spikegen.html>`_\n     - a library for spike generation and data conversion\n   * - `snntorch.spikeplot \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.spikeplot.html>`_\n     - visualization tools for spike-based data using matplotlib and celluloid\n   * - `snntorch.surrogate \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.surrogate.html>`_\n     - optional surrogate gradient functions\n   * - `snntorch.utils \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.utils.html>`_\n     - dataset utility functions\n\nsnnTorch is designed to be intuitively used with PyTorch, as though each spiking neuron were simply another activation in a sequence of layers. \nIt is therefore agnostic to fully-connected layers, convolutional layers, residual connections, etc. \n\nAt present, the neuron models are represented by recursive functions which removes the need to store membrane potential traces for all neurons in a system in order to calculate the gradient. \nThe lean requirements of snnTorch enable small and large networks to be viably trained on CPU, where needed. \nProvided that the network models and tensors are loaded onto CUDA, snnTorch takes advantage of GPU acceleration in the same way as PyTorch. \n\n\nCitation \n^^^^^^^^^^^^^^^^^^^^^^^^\nIf you find snnTorch useful in your work, please cite the following source:\n\n`Jason K. Eshraghian, Max Ward, Emre Neftci, Xinxin Wang, Gregor Lenz, Girish\nDwivedi, Mohammed Bennamoun, Doo Seok Jeong, and Wei D. Lu “Training\nSpiking Neural Networks Using Lessons From Deep Learning”. Proceedings of the IEEE, 111(9)\nSeptember 2023. \u003Chttps:\u002F\u002Fieeexplore.ieee.org\u002Fabstract\u002Fdocument\u002F10242251>`_\n\n.. code-block:: bash\n\n  @article{eshraghian2021training,\n          title   =  {Training spiking neural networks using lessons from deep learning},\n          author  =  {Eshraghian, Jason K and Ward, Max and Neftci, Emre and Wang, Xinxin \n                      and Lenz, Gregor and Dwivedi, Girish and Bennamoun, Mohammed and \n                     Jeong, Doo Seok and Lu, Wei D},\n          journal = {Proceedings of the IEEE},\n          volume  = {111},\n          number  = {9},\n          pages   = {1016--1054},\n          year    = {2023}\n  }\n\nLet us know if you are using snnTorch in any interesting work, research or blogs, as we would love to hear more about it! Reach out at snntorch@gmail.com.\n\nRequirements \n^^^^^^^^^^^^^^^^^^^^^^^^\nPyTorch should be installed to use snnTorch. Ensure the correct version of torch is installed for your system to enable CUDA compatibility.\n\nThe following packages are automatically installed if using the pip command:\n\n* numpy\n* pandas\n\nThe following packages are required for using `export_nir` and `import_nir`:\n\n* nir>=1.0.6\n* nirtorch>=2.0.5\n\nThe following packages are required for using `spikeplot`:\n\n* matplotlib\n\nInstallation\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nRun the following to install:\n\n.. code-block:: bash\n\n  $ python\n  $ pip install snntorch\n\nTo install snnTorch from source instead::\n\n  $ git clone https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002FsnnTorch\n  $ cd snntorch\n  $ python setup.py install\n\n\nTo install snntorch with conda::\n\n    $ conda install -c conda-forge snntorch\n\nTo install for an Intelligent Processing Units (IPU) based build using Graphcore's accelerators::\n\n  $ pip install snntorch-ipu\n    \n\nAPI & Examples \n^^^^^^^^^^^^^^^^^^^^^^^^\nA complete API is available `here \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002F>`__. Examples, tutorials and Colab notebooks are provided.\n\n\n\nQuickstart \n^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Fquickstart.ipynb\n\n\nHere are a few ways you can get started with snnTorch:\n\n\n* `Quickstart Notebook (Opens in Colab)`_\n\n* `The API Reference`_ \n\n* `Examples`_\n\n* `Tutorials`_\n\n.. _Quickstart Notebook (Opens in Colab): https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Fquickstart.ipynb\n.. _The API Reference: https:\u002F\u002Fsnntorch.readthedocs.io\u002F\n.. _Examples: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fexamples.html\n.. _Tutorials: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Findex.html\n\n\nFor a quick example to run snnTorch, see the following snippet, or test the quickstart notebook:\n\n\n.. code-block:: python\n\n  import torch, torch.nn as nn\n  import snntorch as snn\n  from snntorch import surrogate\n  from snntorch import utils\n\n  num_steps = 25 # number of time steps\n  batch_size = 1 \n  beta = 0.5  # neuron decay rate \n  spike_grad = surrogate.fast_sigmoid() # surrogate gradient\n\n  net = nn.Sequential(\n        nn.Conv2d(1, 8, 5),\n        nn.MaxPool2d(2),\n        snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad),\n        nn.Conv2d(8, 16, 5),\n        nn.MaxPool2d(2),\n        snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad),\n        nn.Flatten(),\n        nn.Linear(16 * 4 * 4, 10),\n        snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad, output=True)\n        )\n\n  data_in = torch.rand(num_steps, batch_size, 1, 28, 28) # random input data\n  spike_recording = [] # record spikes over time\n  utils.reset(net) # reset\u002Finitialize hidden states for all neurons\n\n  for step in range(num_steps): # loop over time\n      spike, state = net(data_in[step]) # one time step of forward-pass\n      spike_recording.append(spike) # record spikes in list\n\n\nA Deep Dive into SNNs\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\nIf you wish to learn all the fundamentals of training spiking neural networks, from neuron models, to the neural code, up to backpropagation, the snnTorch tutorial series is a great place to begin.\nIt consists of interactive notebooks with complete explanations that can get you up to speed.\n\n\n.. list-table::\n   :widths: 20 60 30\n   :header-rows: 1\n\n   * - Tutorial\n     - Title\n     - Colab Link\n   * - `Tutorial 1 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_1.html>`_\n     - Spike Encoding with snnTorch\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_1_spikegen.ipynb\n\n   * - `Tutorial 2 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_2.html>`_\n     - The Leaky Integrate and Fire Neuron\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_2_lif_neuron.ipynb\n\n   * - `Tutorial 3 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_3.html>`_\n     -  A Feedforward Spiking Neural Network\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_3_feedforward_snn.ipynb\n\n\n   * - `Tutorial 4 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_4.html>`_\n     -  2nd Order Spiking Neuron Models (Optional)\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_4_advanced_neurons.ipynb\n\n  \n   * - `Tutorial 5 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_5.html>`_\n     -  Training Spiking Neural Networks with snnTorch\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_5_FCN.ipynb\n   \n\n   * - `Tutorial 6 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_6.html>`_\n     - Surrogate Gradient Descent in a Convolutional SNN\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_6_CNN.ipynb\n\n   * - `Tutorial 7 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_7.html>`_\n     - Neuromorphic Datasets with Tonic + snnTorch\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_7_neuromorphic_datasets.ipynb\n\n.. list-table::\n   :widths: 70 40\n   :header-rows: 1\n\n   * - Advanced Tutorials\n     - Colab Link\n\n   * - `Population Coding \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_pop.html>`_\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_pop.ipynb\n\n   * - `Regression: Part I - Membrane Potential Learning with LIF Neurons \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_regression_1.html>`_\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_regression_1.ipynb\n\n   * - `Regression: Part II - Regression-based Classification with Recurrent LIF Neurons \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_regression_2.html>`_\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: Open In Colab\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_regression_2.ipynb\n\n   * - `Accelerating snnTorch on IPUs \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_ipu_1.html>`_\n     -       —\n\nContributing\n^^^^^^^^^^^^^^^^^^^^^^^^\nIf you're ready to contribute to snnTorch, instructions to do so can be `found here`_.\n\n.. _found here: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fcontributing.html\n\nAcknowledgments\n^^^^^^^^^^^^^^^^^^^^^^^^\nsnnTorch is currently maintained by the `UCSC Neuromorphic Computing Group \u003Chttps:\u002F\u002Fncg.ucsc.edu>`_. It was initially developed by `Jason K. Eshraghian`_ in the `Lu Group (University of Michigan)`_. \n\nAdditional contributions were made by `Vincent Sun \u003Chttps:\u002F\u002Fgithub.com\u002Fvinniesun>`_, `Peng Zhou \u003Chttps:\u002F\u002Fgithub.com\u002Fpengzhouzp>`_, `Ridger Zhu \u003Chttps:\u002F\u002Fgithub.com\u002Fridgerchu>`_, `Alexander Henkes \u003Chttps:\u002F\u002Fgithub.com\u002Fahenkes1>`_, `Steven Abreu \u003Chttps:\u002F\u002Fgithub.com\u002Fstevenabreu7>`_, Xinxin Wang, Sreyes Venkatesh, `gekkom \u003Chttps:\u002F\u002Fgithub.com\u002Fgekkom>`_, and Emre Neftci.\n\n.. _Jason K. Eshraghian: https:\u002F\u002Fjasoneshraghian.com\n.. _Lu Group (University of Michigan): https:\u002F\u002Flugroup.engin.umich.edu\u002F\n\n\nLicense & Copyright\n^^^^^^^^^^^^^^^^^^^^^^^^\nsnnTorch source code is published under the terms of the MIT License. \nsnnTorch's documentation is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License (`CC BY-SA 3.0 \u003Chttps:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-sa\u002F3.0\u002F>`_).\n","================\n简介\n================\n\n.. |build| image:: https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Factions\u002Fworkflows\u002Fbuild.yml\u002Fbadge.svg\n   :target: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n\n.. |docs| image:: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fsnntorch\u002Fbadge\u002F?version=latest\n   :target: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n\n.. |discord| image:: https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F906036932725841941\n   :target: https:\u002F\u002Fdiscord.gg\u002FcdZb5brajb\n\n.. |pypi| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fsnntorch.svg\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Fsnntorch\n\n.. |conda| image:: https:\u002F\u002Fimg.shields.io\u002Fconda\u002Fvn\u002Fconda-forge\u002Fsnntorch.svg\n   :target: https:\u002F\u002Fanaconda.org\u002Fconda-forge\u002Fsnntorch\n\n.. |downloads| image:: https:\u002F\u002Fstatic.pepy.tech\u002Fpersonalized-badge\u002Fsnntorch?period=total&units=international_system&left_color=grey&right_color=orange&left_text=Downloads\n   :target: https:\u002F\u002Fpepy.tech\u002Fproject\u002Fsnntorch\n\n.. |neuromorphiccomputing| image:: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCollaboration_Network-Open_Neuromorphic-blue\n   :target: https:\u002F\u002Fopen-neuromorphic.org\u002Fneuromorphic-computing\u002F\n\n|build| |docs| |discord| |pypi| |conda| |downloads| |neuromorphiccomputing|\n\n\n大脑是寻找灵感以开发更高效神经网络的理想场所。与现代深度学习的主要区别之一在于，大脑通过脉冲而非连续激活来编码信息。\nsnnTorch 是一个用于执行基于梯度的脉冲神经网络学习的 Python 软件包。\n它扩展了 PyTorch 的功能，利用其 GPU 加速的张量计算，并将其应用于脉冲神经元网络。预先设计好的脉冲神经元模型无缝集成到 PyTorch 框架中，可以被视为递归激活单元。\n\n\n.. image:: https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fdocs\u002F_static\u002Fimg\u002Fspike_excite_alpha_ps2.gif?raw=true\n        :align: center\n        :width: 800\n\n如果您喜欢这个项目，请考虑为本仓库标上星⭐，这是支持该项目最简单也是最好的方式。\n\n如果您遇到问题、有任何意见，或者正在寻求关于训练脉冲神经网络的建议，您可以在我们的 `discord \u003Chttps:\u002F\u002Fdiscord.gg\u002FcdZb5brajb>`_ 频道中提交问题、发起讨论或进行交流。\n\nsnnTorch 结构\n^^^^^^^^^^^^^^^^^^^^^^^^\nsnnTorch 包含以下组件：\n\n.. list-table::\n   :widths: 20 60\n   :header-rows: 1\n\n   * - 组件\n     - 描述\n   * - `snntorch \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.html>`_\n     - 类似于 torch.nn 的脉冲神经元库，与 autograd 深度集成\n   * - `snntorch.export_nir \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.export_nir.html>`_\n     - 通过 `NIR \u003Chttps:\u002F\u002Fnnir.readthedocs.io\u002Fen\u002Flatest\u002F>`_ 实现与其他 SNN 库的导出功能\n   * - `snntorch.functional \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.functional.html>`_\n     - 针对脉冲的常用算术运算，例如损失函数、正则化等\n   * - `snntorch.import_nir \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.import_nir.html>`_\n     - 通过 `NIR \u003Chttps:\u002F\u002Fnnir.readthedocs.io\u002Fen\u002Flatest\u002F>`_ 实现从其他 SNN 库导入的功能\n   * - `snntorch.spikegen \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.spikegen.html>`_\n     - 用于脉冲生成和数据转换的工具库\n   * - `snntorch.spikeplot \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.spikeplot.html>`_\n     - 使用 matplotlib 和 celluloid 对基于脉冲的数据进行可视化的工具\n   * - `snntorch.surrogate \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.surrogate.html>`_\n     - 可选的替代梯度函数\n   * - `snntorch.utils \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fsnntorch.utils.html>`_\n     - 数据集相关的实用函数\n\nsnnTorch 的设计旨在与 PyTorch 相互配合，使用起来直观便捷，仿佛每个脉冲神经元只是序列层中的另一个激活单元。\n因此，它对全连接层、卷积层、残差连接等都具有通用性。\n\n目前，神经元模型由递归函数表示，这使得在计算梯度时无需存储系统中所有神经元的膜电位轨迹。\nsnnTorch 的轻量化特性使其能够在必要时在 CPU 上有效地训练小型和大型网络。\n只要将网络模型和张量加载到 CUDA 上，snnTorch 就能像 PyTorch 一样充分利用 GPU 加速。\n\n\n引用 \n^^^^^^^^^^^^^^^^^^^^^^^^\n如果您在工作中发现 snnTorch 很有用，请引用以下文献：\n\n`Jason K. Eshraghian, Max Ward, Emre Neftci, Xinxin Wang, Gregor Lenz, Girish\nDwivedi, Mohammed Bennamoun, Doo Seok Jeong, and Wei D. Lu “Training\nSpiking Neural Networks Using Lessons From Deep Learning”. Proceedings of the IEEE, 111(9)\nSeptember 2023. \u003Chttps:\u002F\u002Fieeexplore.ieee.org\u002Fabstract\u002Fdocument\u002F10242251>`_\n\n.. code-block:: bash\n\n  @article{eshraghian2021training,\n          title   =  {Training spiking neural networks using lessons from deep learning},\n          author  =  {Eshraghian, Jason K and Ward, Max and Neftci, Emre and Wang, Xinxin \n                      and Lenz, Gregor and Dwivedi, Girish and Bennamoun, Mohammed and \n                     Jeong, Doo Seok and Lu, Wei D},\n          journal = {Proceedings of the IEEE},\n          volume  = {111},\n          number  = {9},\n          pages   = {1016--1054},\n          year    = {2023}\n  }\n\n如果您在任何有趣的工作、研究或博客中使用了 snnTorch，请告知我们，我们非常期待了解更多信息！请发送邮件至 snntorch@gmail.com。\n\n要求 \n^^^^^^^^^^^^^^^^^^^^^^^^\n要使用 snnTorch，必须先安装 PyTorch。请确保为您的系统安装正确版本的 PyTorch，以实现 CUDA 兼容性。\n\n如果使用 pip 命令安装，以下软件包会自动安装：\n\n* numpy\n* pandas\n\n使用 `export_nir` 和 `import_nir` 功能时，需要以下软件包：\n\n* nir>=1.0.6\n* nirtorch>=2.0.5\n\n使用 `spikeplot` 功能时，需要以下软件包：\n\n* matplotlib\n\n安装\n^^^^^^^^^^^^^^^^^^^^^^^^\n\n运行以下命令进行安装：\n\n.. code-block:: bash\n\n  $ python\n  $ pip install snntorch\n\n若要从源代码安装 snnTorch：\n\n  $ git clone https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\n  $ cd snntorch\n  $ python setup.py install\n\n\n使用 conda 安装 snnTorch：\n\n    $ conda install -c conda-forge snntorch\n\n若要为基于 Graphcore 加速器的智能处理单元（IPU）构建环境安装：\n\n  $ pip install snntorch-ipu\n    \n\nAPI 与示例 \n^^^^^^^^^^^^^^^^^^^^^^^^\n完整的 API 文档可在 `这里 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002F>`__ 查阅。同时提供示例、教程和 Colab 笔记本。\n\n\n\n快速入门 \n^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Fquickstart.ipynb\n\n以下是开始使用 snnTorch 的几种方式：\n\n\n* `快速入门笔记本（在 Colab 中打开）`_\n\n* `API 参考文档`_ \n\n* `示例`_\n\n* `教程`_\n\n.. _快速入门笔记本（在 Colab 中打开）: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Fquickstart.ipynb\n.. _API 参考文档: https:\u002F\u002Fsnntorch.readthedocs.io\u002F\n.. _示例: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fexamples.html\n.. _教程: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Findex.html\n\n\n要快速运行 snnTorch 示例，请参阅以下代码片段，或尝试运行快速入门笔记本：\n\n\n.. code-block:: python\n\n  import torch, torch.nn as nn\n  import snntorch as snn\n  from snntorch import surrogate\n  from snntorch import utils\n\n  num_steps = 25 # 时间步数\n  batch_size = 1 \n  beta = 0.5  # 神经元衰减率 \n  spike_grad = surrogate.fast_sigmoid() # 替代梯度\n\n  net = nn.Sequential(\n        nn.Conv2d(1, 8, 5),\n        nn.MaxPool2d(2),\n        snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad),\n        nn.Conv2d(8, 16, 5),\n        nn.MaxPool2d(2),\n        snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad),\n        nn.Flatten(),\n        nn.Linear(16 * 4 * 4, 10),\n        snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad, output=True)\n        )\n\n  data_in = torch.rand(num_steps, batch_size, 1, 28, 28) # 随机输入数据\n  spike_recording = [] # 记录随时间变化的尖峰信号\n  utils.reset(net) # 重置\u002F初始化所有神经元的隐藏状态\n\n  for step in range(num_steps): # 按时间步循环\n      spike, state = net(data_in[step]) # 单个时间步的前向传播\n      spike_recording.append(spike) # 将尖峰信号记录到列表中\n\n\nSNN 深度解析\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n如果您希望学习训练脉冲神经网络的所有基础知识，从神经元模型、神经编码到反向传播，snnTorch 教程系列是一个很好的起点。它由交互式笔记本组成，提供了完整的解释，可以帮助您迅速掌握相关知识。\n\n\n.. list-table::\n   :widths: 20 60 30\n   :header-rows: 1\n\n   * - 教程\n     - 标题\n     - Colab 链接\n   * - `教程 1 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_1.html>`_\n     - 使用 snnTorch 进行尖峰编码\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_1_spikegen.ipynb\n\n   * - `教程 2 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_2.html>`_\n     - 泄漏积分发放神经元\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_2_lif_neuron.ipynb\n\n   * - `教程 3 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_3.html>`_\n     - 前馈型脉冲神经网络\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_3_feedforward_snn.ipynb\n\n\n   * - `教程 4 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_4.html>`_\n     - 二阶脉冲神经元模型（可选）\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_4_advanced_neurons.ipynb\n\n  \n   * - `教程 5 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_5.html>`_\n     - 使用 snnTorch 训练脉冲神经网络\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_5_FCN.ipynb\n   \n\n   * - `教程 6 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_6.html>`_\n     - 卷积脉冲神经网络中的替代梯度下降\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_6_CNN.ipynb\n\n   * - `教程 7 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_7.html>`_\n     - 使用 Tonic + snnTorch 处理神经形态数据集\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_7_neuromorphic_datasets.ipynb\n\n.. list-table::\n   :widths: 70 40\n   :header-rows: 1\n\n   * - 高级教程\n     - Colab 链接\n\n   * - `群体编码 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_pop.html>`_\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_pop.ipynb\n\n   * - `回归：第一部分——使用 LIF 神经元进行膜电位学习 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_regression_1.html>`_\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_regression_1.ipynb\n\n   * - `回归：第二部分——基于回归的递归 LIF 神经元分类 \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_regression_2.html>`_\n     - .. image:: https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\n        :alt: 在 Colab 中打开\n        :target: https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fjeshraghian\u002Fsnntorch\u002Fblob\u002Fmaster\u002Fexamples\u002Ftutorial_regression_2.ipynb\n\n   * - `在 IPU 上加速 snnTorch \u003Chttps:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Ftutorial_ipu_1.html>`_\n     -       —\n\n贡献\n^^^^^^^^^^^^^^^^^^^^^^^^\n如果您准备为 snnTorch 做出贡献，可以在此处找到相关说明：`此处`_。\n\n.. _此处: https:\u002F\u002Fsnntorch.readthedocs.io\u002Fen\u002Flatest\u002Fcontributing.html\n\n致谢\n^^^^^^^^^^^^^^^^^^^^^^^^\nsnnTorch 目前由 `UCSC 神经形态计算小组 \u003Chttps:\u002F\u002Fncg.ucsc.edu>`_ 维护。它最初由 `Jason K. Eshraghian`_ 在 `密歇根大学 Lu 实验室`_ 开发。\n\n此外，`Vincent Sun \u003Chttps:\u002F\u002Fgithub.com\u002Fvinniesun>`_、`Peng Zhou \u003Chttps:\u002F\u002Fgithub.com\u002Fpengzhouzp>`_、`Ridger Zhu \u003Chttps:\u002F\u002Fgithub.com\u002Fridgerchu>`_、`Alexander Henkes \u003Chttps:\u002F\u002Fgithub.com\u002Fahenkes1>`_、`Steven Abreu \u003Chttps:\u002F\u002Fgithub.com\u002Fstevenabreu7>`_、Xinxin Wang、Sreyes Venkatesh、`gekkom \u003Chttps:\u002F\u002Fgithub.com\u002Fgekkom>`_ 以及 Emre Neftci 也做出了重要贡献。\n\n.. _杰森·K·埃什拉吉安: https:\u002F\u002Fjasoneshraghian.com\n.. _卢组（密歇根大学）: https:\u002F\u002Flugroup.engin.umich.edu\u002F\n\n\n许可与版权\n^^^^^^^^^^^^^^^^^^^^^^^^\nsnnTorch 的源代码根据 MIT 许可证的条款发布。\nsnnTorch 的文档则采用知识共享署名-相同方式共享 3.0 未本地化许可协议（`CC BY-SA 3.0 \u003Chttps:\u002F\u002Fcreativecommons.org\u002Flicenses\u002Fby-sa\u002F3.0\u002F>`_）授权。","# snntorch 快速上手指南\n\nsnntorch 是一个基于 PyTorch 的脉冲神经网络（SNN）库，旨在利用深度学习的方法训练类脑神经网络。它将脉冲神经元模型无缝集成到 PyTorch 框架中，支持 GPU 加速，并允许将神经元视为循环激活单元进行处理。\n\n## 环境准备\n\n在使用 snntorch 之前，请确保您的系统满足以下要求：\n\n*   **操作系统**：Linux, macOS, 或 Windows\n*   **Python 版本**：建议 Python 3.8+\n*   **核心依赖**：必须预先安装 **PyTorch**。请根据您的 CUDA 版本安装对应的 torch 版本以启用 GPU 加速。\n*   **自动安装依赖**：`numpy`, `pandas`\n*   **可选依赖**：\n    *   若需使用数据可视化 (`spikeplot`)：需安装 `matplotlib`\n    *   若需与其他 SNN 库互操作 (`export_nir`\u002F`import_nir`)：需安装 `nir>=1.0.6` 和 `nirtorch>=2.0.5`\n\n> **国内开发者提示**：如果下载 PyTorch 或 snntorch 速度较慢，推荐使用清华源或阿里源进行加速。\n\n## 安装步骤\n\n您可以选择以下任意一种方式进行安装：\n\n### 方式一：使用 pip 安装（推荐）\n\n直接使用 pip 安装最新版本：\n\n```bash\npip install snntorch\n```\n\n**国内加速安装**（使用清华源）：\n\n```bash\npip install snntorch -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 方式二：使用 Conda 安装\n\n如果您使用 Anaconda 或 Miniconda 环境：\n\n```bash\nconda install -c conda-forge snntorch\n```\n\n### 方式三：从源码安装\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002FsnnTorch\ncd snntorch\npython setup.py install\n```\n\n### 特殊硬件支持\n\n如果您使用的是 Graphcore 的智能处理单元 (IPU)：\n\n```bash\npip install snntorch-ipu\n```\n\n## 基本使用\n\nsnntorch 的设计哲学是与 PyTorch 高度兼容。您可以像构建普通神经网络一样构建 SNN，只需将部分层替换为 `snn` 模块中的神经元层即可。\n\n以下是一个最简单的示例，展示如何构建一个包含卷积层和泄漏积分发放（Leaky Integrate-and-Fire）神经元的网络，并进行时间步迭代推理：\n\n```python\nimport torch\nimport torch.nn as nn\nimport snntorch as snn\nfrom snntorch import surrogate\nfrom snntorch import utils\n\n# 1. 定义超参数\nnum_steps = 25          # 时间步数量\nbatch_size = 1          \nbeta = 0.5              # 神经元衰减率 (leak rate)\nspike_grad = surrogate.fast_sigmoid() # 代理梯度函数\n\n# 2. 构建网络\n# 注意：snn.Leaky 层可以像普通激活函数一样嵌入到 nn.Sequential 中\nnet = nn.Sequential(\n    nn.Conv2d(1, 8, 5),\n    nn.MaxPool2d(2),\n    snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad),\n    nn.Conv2d(8, 16, 5),\n    nn.MaxPool2d(2),\n    snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad),\n    nn.Flatten(),\n    nn.Linear(16 * 4 * 4, 10),\n    snn.Leaky(beta=beta, init_hidden=True, spike_grad=spike_grad, output=True)\n)\n\n# 3. 准备输入数据 (时间步，批次，通道，高，宽)\ndata_in = torch.rand(num_steps, batch_size, 1, 28, 28) \n\n# 4. 初始化\u002F重置神经元状态\nutils.reset(net) \n\nspike_recording = [] # 用于记录每个时间步的脉冲输出\n\n# 5. 时间步迭代前向传播\nfor step in range(num_steps):\n    # 每次传入一个时间步的数据\n    spike, state = net(data_in[step]) \n    spike_recording.append(spike)\n\n# 此时 spike_recording 包含了整个时间窗口内的脉冲序列\nprint(f\"模拟完成，共记录 {len(spike_recording)} 个时间步的脉冲数据。\")\n```\n\n### 关键点说明：\n*   **`init_hidden=True`**：告诉神经元层在第一次前向传播时自动初始化膜电位状态。\n*   **`utils.reset(net)`**：在处理新的输入样本前，务必重置网络中所有神经元的隐藏状态（膜电位），否则状态会延续到下一个样本。\n*   **时间循环**：SNN 的核心在于时间维度。通常需要将输入数据按时间步切片，并在循环中逐个传入网络。","某边缘计算团队正在为电池供电的工业传感器开发实时异常检测系统，需在极低功耗下处理高频振动数据。\n\n### 没有 snntorch 时\n- 开发者必须从零手动编写脉冲神经元（SNN）的复杂微分方程和反向传播算法，极易出错且难以调试。\n- 无法直接利用 PyTorch 成熟的 GPU 加速生态，导致模型训练速度极慢，迭代周期长达数周。\n- 缺乏将连续振动信号高效转换为脉冲序列的标准工具，数据预处理代码冗长且性能低下。\n- 缺少可视化的脉冲时空分布工具，难以直观分析神经元发放模式以优化网络结构。\n- 模型难以部署到神经形态芯片，因为缺乏与其他 SNN 框架兼容的标准导出接口。\n\n### 使用 snntorch 后\n- 直接调用 snntorch 预置的脉冲神经元模块，像搭建普通 PyTorch 层一样构建网络，自动处理梯度计算。\n- 无缝继承 PyTorch 的张量运算与 GPU 加速能力，将原本数周的训练时间缩短至数小时。\n- 利用 snntorch.spikegen 模块一键将振动数据编码为脉冲流，大幅简化数据流水线并提升编码效率。\n- 通过 snntorch.spikeplot 快速生成脉冲发放图，直观监控网络动态，迅速定位并调整模型参数。\n- 借助 snntorch.export_nir 功能将训练好的模型标准导出，轻松迁移至各类神经形态硬件进行低功耗推理。\n\nsnntorch 通过深度集成 PyTorch 生态，极大地降低了脉冲神经网络的研发门槛，让类脑计算在低功耗边缘场景中真正落地成为可能。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fjeshraghian_snntorch_031401c1.png","jeshraghian","Jason Eshraghian","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fjeshraghian_138c62de.jpg","Assistant Professor at the University of California, Santa Cruz. Leading the Neuromorphic Research Computing Group.","University of California, Santa Cruz",null,"jasoneshraghian","ncg.ucsc.edu","https:\u002F\u002Fgithub.com\u002Fjeshraghian",[82,86,90],{"name":83,"color":84,"percentage":85},"Python","#3572A5",61.4,{"name":87,"color":88,"percentage":89},"Jupyter Notebook","#DA5B0B",38.4,{"name":91,"color":92,"percentage":93},"Makefile","#427819",0.2,1931,282,"2026-04-11T02:48:44","MIT",1,"未说明","非必需。支持 CPU 运行；若使用 GPU 加速，需将模型和张量加载至 CUDA 环境（具体显卡型号、显存大小及 CUDA 版本未说明，取决于已安装的 PyTorch 版本）。",{"notes":102,"python":99,"dependencies":103},"该工具是 PyTorch 的扩展，用于脉冲神经网络（SNN）。核心功能仅需安装 PyTorch、numpy 和 pandas。若需使用导出\u002F导入 NIR 格式功能，需额外安装 nir 和 nirtorch；若需使用可视化功能（spikeplot），需安装 matplotlib。项目支持在 CPU 上训练小型和大型网络，也支持通过 CUDA 进行 GPU 加速。针对 Graphcore IPU 加速器有专门的安装包（snntorch-ipu）。",[104,105,106,107,108,109],"torch","numpy","pandas","matplotlib","nir>=1.0.6","nirtorch>=2.0.5",[111,14],"其他",[113,114,115,116,117,118,119,120,121,122],"pytorch","spiking-neural-networks","neuron-models","python","neural-networks","machine-learning","neuroscience","snn","spiking","spike","2026-03-27T02:49:30.150509","2026-04-13T22:45:49.487119",[126,131,136,141,146,151],{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},31978,"如何在回归任务中使用 snnTorch？有哪些示例或设置建议？","虽然官方教程主要集中在分类任务，但回归任务也是可行的。通常使用均方误差（MSELoss）作为损失函数。对于更高级的回归应用（如事件相机数据），可以尝试结合 Tonic 库中的数据集，将时间戳、坐标和极性数据作为输入，预测连续值。目前社区正在讨论相关教程的开发，建议关注官方 Discord 频道获取最新进展。","https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fissues\u002F98",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},31979,"在 IPU 环境使用 snntorch-ipu 时遇到 'Missing Straight Through Estimator Custom Operation file' 错误或编译失败怎么办？","这是由于 Popart API 更新导致缺少必要的头文件。临时修复方法是在终端中手动修改以下三个文件，在文件顶部添加 #include \u003Cpopart\u002Fpopx\u002Fopx.hpp>：\n1. \u002Fusr\u002Flocal\u002Flib\u002Fpython3.8\u002Fdist-packages\u002Fsnntorch\u002Fcustom_ops\u002Ffast_sigmoid.cpp\n2. \u002Fusr\u002Flocal\u002Flib\u002Fpython3.8\u002Fdist-packages\u002Fsnntorch\u002Fcustom_ops\u002Fheaviside_custom_op.cpp\n3. \u002Fusr\u002Flocal\u002Flib\u002Fpython3.8\u002Fdist-packages\u002Fsnntorch\u002Fcustom_ops\u002Fstraight_through_estimator.cpp\n修改后重新编译生成共享对象文件（.so）。长期解决方案是从 Git 源码安装并手动编译，等待官方 PyPI 更新。","https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fissues\u002F153",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},31980,"运行 Tutorial 2 (Lapicque LIF 神经元模型) 时出现错误，之前能正常运行，现在不行了是什么原因？","这通常是由于 snnTorch 版本更新导致的 API 变更或参数默认值调整。请检查您的代码是否使用了已弃用的参数或旧的初始化方式。确保您安装的 snnTorch 版本与教程文档对应的版本一致。如果问题持续，建议查看最新的官方教程笔记或 GitHub 上的相关修复提交，通常只需调整神经元初始化的参数即可解决。","https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fissues\u002F306",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},31981,"为什么我的 SNN 网络训练时损失震荡且学不到任何东西（准确率无提升），而同等架构的传统 CNN 效果很好？","SNN 对超参数非常敏感，特别是膜电位衰减系数 alpha 和 beta。常见问题及建议：\n1. 参数范围：alpha 通常在 0.4 到 0.8 之间，beta 在 0.3 到 0.9 之间，具体取决于用例。\n2. 编码方式：检查是否正确使用了时序编码（Temporal encoding）或延迟编码（Latency encoding）。\n3. 参数独立性：尝试将 alpha\u002Fbeta 设置为每层甚至每个神经元独立的参数，而不是全局共享，因为全局参数容易收敛到极端值（0 或远大于 1）导致失效。\n4. 梯度代理：确保正确应用了 surrogate gradient (spike_grad)。","https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fissues\u002F33",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},31982,"在 GPU 上创建 LIF 神经元时遇到 'Expected all tensors to be on the same device' 错误如何解决？","这是因为神经元内部的状态张量（如 mem）默认在 CPU 上，而输入数据在 GPU 上。解决方法有两种：\n1. 手动移动状态：在模型初始化后，显式地将神经元的记忆状态移动到 GPU，例如：self.leaky1.mem = self.leaky1.mem.to('cuda')。\n2. 确保输入和设备一致：在每次前向传播前，确保输入张量和所有模型组件都在同一设备上。较新版本的 snnTorch 可能已自动处理设备迁移，若遇此问题请检查版本或采用手动迁移方案。","https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fissues\u002F316",{"id":152,"question_zh":153,"answer_zh":154,"source_url":145},31983,"在使用延迟编码（Latency encoding）时，训练集和测试集的准确率在每个 mini-batch 都完全一样，这是正常的吗？","这种情况通常不正常，可能意味着模型没有真正在学习或者编码方式导致了信息丢失。延迟编码将强度转换为发放时间，如果参数设置不当，可能导致所有样本产生相似的脉冲模式。建议检查编码函数的实现，确认不同强度的输入确实产生了不同的脉冲时间分布。此外，验证损失函数是否能有效引导基于时间的梯度更新。",[156,161,166,171,176,181,186,191],{"id":157,"version":158,"summary_zh":159,"released_at":160},239227,"v0.8.1","## 新特性\n\n# 与 NIR 的兼容性\n* 添加对 CubaLIF 的 Synaptic 支持，并由 @pengzhouzp 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F227 中更新 Leaky 模型的 tau\u002Fr 参数。\n* 由 @stevenabreu7 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F246 中更新 NIR 与 snnTorch 的兼容性。\n\n# 与 `torch.compile()` 的兼容性\n* 添加对 `torch.compile(fullgraph=True)` 的支持，由 @gekkom 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F271 中进行中。\n* 由 @gekkom 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F292 中为更多神经元模型添加 `torch.compile(fullgraph=True)` 支持。\n* 由 @gekkom 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F291 中移除会破坏 `torch.compile` 的自动求导函数中的默认值。\n\n# Leaky 并行神经元\n* 由 @jeshraghian 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F266 中实现 LeakyParallel 神经元。\n* 由 @jeshraghian 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F288 中实现并行化。\n\n# 自定义替代梯度\n* 由 @mehranfaraji 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F237 中实现自定义替代梯度函数。\n* 由 @abrasumente233 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F238 中移除重复的反正切公式。\n* 由 @ahenkes1 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F239 中更新 snntorch.surrogate.rst 文件。\n\n# 状态量化\n* 由 @SreyesVenkatesh 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F231 中提出更鲁棒的2位状态量化方法。\n\n# 其他新增功能\n* 由 @saiftyfirst 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F243 中添加 BNN 测试。\n* 由 @laurentperrinet 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F247 中添加 MPS 作为可能的计算后端。\n* 由 @saiftyfirst 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F255 中实现不均衡类别权重调整。\n\n## Bug 修复\n* 由 @jeshraghian 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F233 中更新 build.yml 文件。\n* 由 @be-Berserker 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F235 中修改突触神经元相关代码。\n\n## 文档 + 教程\n* 由 @jeshraghian 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F241 中更新 README.rst 文件。\n* 由 @ruhai-lin 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F245 中提交中文教程1的合并请求。\n* 由 @jeshraghian 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F249 中更新引用信息。\n* 由 @jeshraghian 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F251 中更新 tutorial_5_FCN.ipynb 教程。\n* 由 @jeshraghian 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F259 中再次更新 README.rst 文件。\n* 由 @DerrickL25 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F264 中添加 DVS 手势识别教程。\n* 由 @seanvenadas 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F268 和 \u002F269 中分别更新 tutorial_regression_1.rst 教程。\n* 由 @mercadoerik1031 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F272 中提供 BSNN 教程。\n* 由 @ruhai-lin 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F281 中上传系外行星探测器教程及中文教程。\n* 由 @laurentperrinet 在 https:\u002F\u002Fgithub.","2024-03-17T02:41:38",{"id":162,"version":163,"summary_zh":164,"released_at":165},239228,"v0.7.0","最大的新增功能是 `snntorch.export` 模块，它将 snnTorch 模块与 [神经形态中间表示](https:\u002F\u002Fnnir.readthedocs.io\u002Fen\u002Flatest\u002F) 进行对接。在各种库（例如 Norse、Rockpool、Sinabs、lava-dl 等）中训练的 SNN 模型都可以被转换，以便利用特定库中可用的后端。\n\n## 变更内容\n* @ahenkes1 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F217 中更新了 leaky.py 文件。\n* @ahenkes1 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F218 中实现了漏斗神经元的分级脉冲。\n* @ahenkes1 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F220 中修复了分级脉冲的注册问题。\n* @gianfa 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F222 中为示例添加了缺失的参数。\n* @timoklein 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F224 中修复了 Linux 系统下回归教程 2 的 MNIST 数据路径问题。\n* @jeshraghian 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F226 中为 NIR 导出函数添加了文档字符串。\n\n## 新贡献者\n* @timoklein 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F224 中完成了他们的首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fcompare\u002Fv0.6.4...v0.7.0","2023-07-12T20:51:41",{"id":167,"version":168,"summary_zh":169,"released_at":170},239229,"v0.6.0","## 变更内容\n* 新增并重构了循环神经元模型\n* `backprop.py` 已弃用\n* 神经元模型已修改，静息函数现按 beta 缩放。这似乎能带来更好的性能。\n* 重置机制已修复\n* 为 Macbook 使用更新了 `spikegen` 和损失函数（使用 Metal 性能着色器“mps”）\n* 修复了 DDP 下的神经元计算问题（感谢 @ridgerchu！）\n* 新增了分级脉冲（感谢 @ahenkes1！）\n* 时间维度上的批量归一化（感谢 @vinniesun！）\n* 更新了替代梯度函数，并将默认替代梯度转换为 ATan 函数（再次感谢 @ridgerchu）\n* 输入与输出函数（再次再次感谢 @ridgerchu）\n\n## 新贡献者\n* @ahenkes1 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F127 中做出了首次贡献\n* @katywarr 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F130 中做出了首次贡献\n* @gianfa 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F132 中做出了首次贡献\n* @TrellixVulnTeam 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F135 中做出了首次贡献\n* @aloe8475 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F174 中做出了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fcompare\u002Fv0.5.3...v0.6.0","2023-02-21T02:41:04",{"id":172,"version":173,"summary_zh":174,"released_at":175},239230,"v0.5.2","## 变更内容\n* 由 @pengzhouzp 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F95 中修复了 leaky 和 rleaky 状态函数的减法问题。\n* 由 @manuelbre 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F108 中实现了 RLeaky 中尖峰信号的分离与重置。\n* 由 @ridgerchu 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F111 中引入了 ATan 替代梯度函数。\n* 由 @ridgerchu 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F115 中修复了可能引发设备不一致的 BPTT Bug。\n* 由 @ridgerchu 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F117 中新增了 'probe' 功能。\n\n## 新贡献者\n* @pengzhouzp 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F95 中完成了首次贡献。\n* @manuelbre 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F108 中完成了首次贡献。\n* @ridgerchu 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F111 中完成了首次贡献。\n* @MegaYEye 在 https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fpull\u002F118 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fcompare\u002Fv0.5.1...v0.5.2","2022-08-04T08:45:32",{"id":177,"version":178,"summary_zh":179,"released_at":180},239231,"v0.5.0","## 新增内容？\n* 重构了神经元模型的结构，便于集成自定义神经元\n* 新增递归漏积分子 `RLeaky`\n* 新增递归突触神经元 `RSynaptic`\n* 新增脉冲 LSTM 神经元 `SLSTM`\n* 新增脉冲卷积 2D LSTM `SConv2dLSTM`\n* 所有神经元均可学习阈值\n* 可学习的显式递归\n* 重置机制现新增“无”选项\n* 更新单元测试\n\n**snntorch.surrogate**\n* 三角形替代函数\n* 直通估计器\n\n**snntorch.functional**\n* 新增 `mse_temporal_loss` 函数\n  对前 F 个尖峰应用均方误差。支持设置容差，并可将标签转换为尖峰时间目标。\n\n* 新增 `ce_temporal_loss`\n  对第一个尖峰的反向值应用交叉熵损失。反向选项包括 -1 * x 和 1\u002Fx，这意味着最大化正确类别的 logits 值等价于最小化对应神经元的发放时间。\n\n* 新增 `accuracy_temporal`\n  根据第一个尖峰的发生情况来衡量准确率\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fjeshraghian\u002Fsnntorch\u002Fcompare\u002Fv0.4.11...v0.5.0","2022-02-10T20:25:44",{"id":182,"version":183,"summary_zh":184,"released_at":185},239232,"v0.2.11","之前版本中关于脉冲编码中张量尺寸的一些错误现已修复。\n\n## 新增内容？\n\n**snntorch.spikegen**\n* 数据与目标的转换已被分离\n* 转换后的尺寸已修正\n* 时间维度仅在张量随时间变化时才会被创建（即，潜伏期始终具有时间维度；而速率则可能没有）\n* 潜伏期与速率的目标转换\n* 包含插值、开\u002F关脉冲值、首次脉冲时间以及开\u002F关速率等选项\n\n**snntorch.surrogate**\n* 替代梯度的参数化已从全局变量移至闭包内的局部变量\n* 脉冲算子（1\u002Fu）\n* 泄漏型局部脉冲算子（等价于移位后的泄漏型ReLU）\n* 局部随机脉冲算子","2021-05-17T01:23:19",{"id":187,"version":188,"summary_zh":189,"released_at":190},239233,"v0.2.1","之前版本中的一些 bug 已经修复。\n\n## 新增内容？\n\n**snntorch**\n* 修复了 SRM0 神经元模型\n* 重置机制现在应用阈值，而不是直接设为 '1'\n* 减法式重置和归零式重置方法已同时应用于 Stein 和 SRM0 神经元\n\n**snntorch.spikegen**\n* 增加了 delta 调制功能\n\n**snntorch.surrogate**\n* 优化了梯度计算\n\n**开发笔记**\n* Travis-CI 不再提供免费服务。已将 travis.yml 替换为 GitHub Actions 集成 + tox。","2021-02-27T08:58:42",{"id":192,"version":193,"summary_zh":194,"released_at":195},239234,"v0.1.2","snntorch 的首个功能迭代版发布！\r\n\r\n## 新增内容？\r\n\r\n**snntorch**\r\n本包的核心模块。\r\n所有神经元模型均在此集成，并采用默认的 Heaviside 梯度来绕过不可导性，从而兼容 PyTorch 中的传统自动微分机制。\r\n\r\n* 施泰因神经元模型\r\n* SRM0 神经元模型\r\n* 放电抑制功能，感谢 @xxwang1 的贡献\r\n* 隐藏状态可选择作为实例变量进行初始化，以便用户直接使用内置的反向传播方法\r\n\r\n**snntorch.backprop**\r\n* 时间反向传播 (BPTT)\r\n* 截断时间反向传播 (TBPTT)\r\n* 实时递归学习 (RTRL)\r\n\r\n**snntorch.spikegen**\r\n* 泊松尖峰序列生成器\r\n* 火率编码\r\n* 延迟编码\r\n\r\n**snntorch.surrogate**\r\n* FastSigmoid\r\n* Sigmoid\r\n* 尖峰率逃逸\r\n\r\n**snntorch.spikeplot**\r\n* 栅格图\r\n* 特征图动画器\r\n* 尖峰计数动画器\r\n\r\n**snntorch.utils**\r\n* 数据划分\r\n* 数据降维\r\n\r\n## Alpha-2 版本计划\r\n* 为 snntorch.spikegen 新增 delta 和 delta-sigma 尖峰生成器\r\n* 简化施泰因模型（将隐藏状态从 2 个减少到 1 个）\r\n* 更多代理函数和反向传播方法\r\n* 增加更多测试用例","2021-02-11T08:27:58"]