Skip to content

Commit d3011a5

Browse files
committed
add sphinx support; add TensorPack
1 parent 1ff905f commit d3011a5

27 files changed

+815
-44
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Downloads](https://static.pepy.tech/badge/nn4n/month)](https://pepy.tech/project/nn4n)<br>
77

88
<p align="center">
9-
<img src="https://github.com/NN4Neurosim/nn4n/blob/main/docs/images/attractor.png" width="300">
9+
<img src="https://github.com/NN4Neurosim/nn4n/blob/main/docs/source/_static/images/attractor.png" width="300">
1010
</p>
1111

1212
## [Documentation](https://nn4n.org/)
@@ -26,7 +26,7 @@ This project aims to address these issues by improving the biological plausibili
2626
A simplistic Vanilla Continuous Time RNN contains three layers: an input layer, a hidden layer, and a readout layer, as depicted below.
2727

2828
<p align="center">
29-
<img src="https://github.com/NN4Neurosim/nn4n/blob/main/docs/images/RNN_structure.png" width="400">
29+
<img src="https://github.com/NN4Neurosim/nn4n/blob/main/docs/source/_static/images/RNN_structure.png" width="400">
3030
</p>
3131

3232
The yellow nodes represent neurons that project input signals to the hidden layer, the green neurons are in the hidden layer, and the purple nodes represent neurons that read out from the hidden layer neurons. Both input and readout neurons are 'imagined' to be there. I.e., they only project or receive signals and, therefore, do not have activations and internal states.
@@ -37,7 +37,7 @@ The implementation of Continuous Time RNN also supports Excitatory-Inhibitory co
3737
A visual illustration of the EIRNN is shown below.
3838

3939
<p align="center">
40-
<img src="https://github.com/NN4Neurosim/nn4n/blob/main/docs/images/EIRNN_structure.png" width="400">
40+
<img src="https://github.com/NN4Neurosim/nn4n/blob/main/docs/source/_static/images/EIRNN_structure.png" width="400">
4141
</p>
4242

4343
The yellow nodes denote nodes in the input layer. The middle circle denotes the hidden layer. There are blue nodes and red nodes, representing inhibitory neurons and excitatory neurons, respectively. The depicted network has an E/I ratio of 4/1. The purple nodes are ReadoutLayer neurons.
@@ -48,7 +48,7 @@ The RNN could also contain multiple areas. Denote the neurons in the hidden laye
4848
A visual illustration of the Multi-Area Continuous Time RNN:
4949

5050
<p align="center">
51-
<img src="https://github.com/NN4Neurosim/nn4n/blob/main/docs/images/multi_area_structure.png" width="400">
51+
<img src="https://github.com/NN4Neurosim/nn4n/blob/main/docs/source/_static/images/multi_area_structure.png" width="400">
5252
</p>
5353
<div style="margin-top: 40px;"></div>
5454

change_log.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
- Removed all batch_first logic.
1+
- Removed all batch_first logic.
2+
- Added TensorPack class to handle tensor packing and unpacking.
3+
- Added docstrings to some functions to support auto doc generation via Sphinx.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/_static/attractor.mp4

652 KB
Binary file not shown.

docs/source/_static/favicon.ico

4.19 KB
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)