Skip to content

Commit

Permalink
Update documentation (#22)
Browse files Browse the repository at this point in the history
* update doc

* update doc
  • Loading branch information
chaoming0625 authored Oct 28, 2024
1 parent 581e872 commit aebf37a
Show file tree
Hide file tree
Showing 32 changed files with 614 additions and 94 deletions.
54 changes: 41 additions & 13 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,20 @@ We are building the `BDP ecosystem <https://ecosystem-for-brain-dynamics.readthe
:caption: Quickstart

quickstart/concepts-en.ipynb
quickstart/ann_training-en.ipynb
quickstart/snn_simulation-en.ipynb
quickstart/snn_training-en.ipynb


.. toctree::
:hidden:
:maxdepth: 1
:caption: 快速开始

quickstart/concepts-zh.ipynb
quickstart/ann_training.ipynb
quickstart/snn_training.ipynb
quickstart/snn_training.ipynb
quickstart/ann_training-zh.ipynb
quickstart/snn_simulation-zh.ipynb
quickstart/snn_training-zh.ipynb



Expand All @@ -125,17 +135,35 @@ We are building the `BDP ecosystem <https://ecosystem-for-brain-dynamics.readthe
:maxdepth: 2
:caption: Tutorials

tutorials/pygraph-zh.ipynb
tutorials/random_numbers.ipynb
tutorials/event_driven_computation.ipynb
tutorials/gspmd.ipynb
tutorials/optimizers.ipynb
tutorials/program_compilation.ipynb
tutorials/program_augmentation.ipynb
tutorials/checkpointing.ipynb
tutorials/align_pre_align_post.ipynb
tutorials/artificial_neural_networks.ipynb

tutorials/state-en.ipynb
tutorials/program_compilation-en.ipynb
tutorials/pygraph-en.ipynb
tutorials/program_augmentation-en.ipynb
tutorials/event_driven_computation-en.ipynb
tutorials/optimizers-en.ipynb
tutorials/gspmd-en.ipynb
tutorials/random_numbers-en.ipynb
tutorials/checkpointing-en.ipynb
tutorials/artificial_neural_networks-en.ipynb
tutorials/spiking_neural_networks-en.ipynb

.. toctree::
:hidden:
:maxdepth: 2
:caption: 使用教程

tutorials/state-zh.ipynb
tutorials/program_compilation-zh.ipynb
tutorials/pygraph-zh.ipynb
tutorials/program_augmentation-zh.ipynb
tutorials/event_driven_computation-zh.ipynb
tutorials/optimizers-zh.ipynb
tutorials/gspmd-zh.ipynb
tutorials/random_numbers-zh.ipynb
tutorials/checkpointing-zh.ipynb
tutorials/artificial_neural_networks-zh.ipynb
tutorials/spiking_neural_networks-zh.ipynb


.. toctree::
Expand Down
35 changes: 35 additions & 0 deletions docs/quickstart/ann_training-en.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Training Artificial Neural Networks"
],
"metadata": {
"collapsed": false
},
"id": "3e91a13480dd82aa"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
File renamed without changes.
12 changes: 6 additions & 6 deletions docs/quickstart/concepts-zh.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
"\n",
"``BrainState`` 的主要功能包括以下几个部分:\n",
"\n",
"- **程序编译**: 支持通过 [State](https://brainstate.readthedocs.io/en/latest/apis/brainstate.html) 语法进行程序[编译](https://brainstate.readthedocs.io/en/latest/apis/compile.html),可在 CPU、GPU、TPU 等不同硬件设备上部署计算模型。\n",
"- **程序功能增强**: 提供 [PyGraph](https://brainstate.readthedocs.io/en/latest/apis/graph.html) 语法的[增强](https://brainstate.readthedocs.io/en/latest/apis/augment.html)功能,通过自动微分、批处理等机制简化构建复杂计算模型的过程。\n",
"- **事件驱动计算**: 支持基于 [事件驱动计算](https://brainstate.readthedocs.io/en/latest/apis/event.html) 的算子优化,大幅提升脉冲神经网络的效率和可扩展性。\n",
"- **程序编译**: 支持通过 [State](../apis/brainstate.rst) 语法进行程序[编译](../apis/compile.rst),可在 CPU、GPU、TPU 等不同硬件设备上部署计算模型。\n",
"- **程序功能增强**: 提供 [PyGraph](../apis/graph.rst) 语法的[增强](../apis/augment.rst)功能,通过自动微分、批处理等机制简化构建复杂计算模型的过程。\n",
"- **事件驱动计算**: 支持基于 [事件驱动计算](../apis/event.rst) 的算子优化,大幅提升脉冲神经网络的效率和可扩展性。\n",
"- **其它附加功能**: 包括随机数生成、梯度代理、模型参数管理等多个便捷的辅助工具,方便用户进行模型搭建。\n",
"\n",
"接下来,我们将逐项深入探讨这些功能的使用方法和优化策略。"
Expand All @@ -66,7 +66,7 @@
"JAX 的程序编写方式通常是通过函数式编程实现,但对于脑动力学模型等复杂计算任务,这种方式可能显得不够直观。``BrainState`` 提供了 ``State`` 语法,一种高度抽象的接口,帮助用户更直观地定义和管理计算状态。``State`` 语法的核心特性包括:\n",
"\n",
"- 所有需要改变的量都被封装在 ``State`` 对象中,方便用户追踪和调试模型状态。\n",
"- 其它没有被 ``State`` 封装的变量都是不可变的,在程序编译后不能再被修改。brainstate中提供的编译函数可以在[``brainstate.compile`` 模块](https://brainstate.readthedocs.io/en/latest/apis/compile.html)中查看。\n",
"- 其它没有被 ``State`` 封装的变量都是不可变的,在程序编译后不能再被修改。brainstate中提供的编译函数可以在[``brainstate.compile`` 模块](../apis/compile.rst)中查看。\n",
"\n",
"这意味着,在BrainState中,所有需要改变的变量都应该被封装在 ``State`` 对象中,以确保程序的正确性和可维护性。"
],
Expand Down Expand Up @@ -485,7 +485,7 @@
"\n",
"在高性能计算领域,硬件加速是提升计算效率的关键,而 ``BrainState`` 通过 ``State`` 语法实现了跨硬件的编译部署。``State`` 提供了一套高度抽象的接口,帮助用户编写一次代码便能生成程序中间表示(IR),并在不同硬件上进行编译和优化。\n",
"\n",
"``brainstate``中提供的编译支持主要集成在 [``brainstate.compile`` 模块](https://brainstate.readthedocs.io/en/latest/apis/compile.html) 中。这些编译APIs囊括了一系列语法功能,包括:\n",
"``brainstate``中提供的编译支持主要集成在 [``brainstate.compile`` 模块](../apis/compile.rst) 中。这些编译APIs囊括了一系列语法功能,包括:\n",
"\n",
"- 条件语句: 支持 if-else 逻辑,方便用户根据不同条件执行不同的计算流程。\n",
"- 循环语句: 支持 for 循环,方便用户重复执行相同的计算操作。\n",
Expand Down Expand Up @@ -770,7 +770,7 @@
{
"cell_type": "markdown",
"source": [
"总的来说,程序功能增强转换为用户提供了一种更方便、更高效的方式来构建和优化计算模型。通过充分利用这些功能,用户能够更快地实现模型的训练和推理,提高模型的性能和效率。更多关于功能增强的转换,可以参考[程序功能增强教程](https://brainstate.readthedocs.io/en/latest/tutorials/program_augmentation.html)。"
"总的来说,程序功能增强转换为用户提供了一种更方便、更高效的方式来构建和优化计算模型。通过充分利用这些功能,用户能够更快地实现模型的训练和推理,提高模型的性能和效率。更多关于功能增强的转换,可以参考[程序功能增强教程](../tutorials/program_augmentation-zh.ipynb)。"
],
"metadata": {
"collapsed": false
Expand Down
35 changes: 35 additions & 0 deletions docs/quickstart/snn_simulation-en.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Simulating Spiking Neural Networks"
],
"metadata": {
"collapsed": false
},
"id": "b78f6e1b6cb0dada"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
File renamed without changes.
35 changes: 35 additions & 0 deletions docs/quickstart/snn_training-en.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Training Spiking Neural Networks"
],
"metadata": {
"collapsed": false
},
"id": "de646938e4e80791"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
File renamed without changes.
35 changes: 0 additions & 35 deletions docs/tutorials/align_pre_align_post.ipynb

This file was deleted.

35 changes: 35 additions & 0 deletions docs/tutorials/artificial_neural_networks-en.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Building Artificial Neural Networks"
],
"metadata": {
"collapsed": false
},
"id": "1a870562d79cf1f1"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"cells": [
{
"cell_type": "markdown",
"source": [],
"source": [
"# 构建人工神经网络"
],
"metadata": {
"collapsed": false
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"metadata": {
"collapsed": false
},
"id": "158db2bb300c7826"
"id": "dbdef1f7bce3a135"
}
],
"metadata": {
Expand Down
35 changes: 35 additions & 0 deletions docs/tutorials/checkpointing-zh.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# 保存和加载检查点"
],
"metadata": {
"collapsed": false
},
"id": "158db2bb300c7826"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
35 changes: 35 additions & 0 deletions docs/tutorials/event_driven_computation-en.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Event-driven Computations"
],
"metadata": {
"collapsed": false
},
"id": "461652726fe9d280"
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit aebf37a

Please sign in to comment.