Skip to content

Commit bbea397

Browse files
ago109rxng8Alexander Ororbiawillgebhardt
authored
Major release update merge to main (in prep for 2.0.0 release on release branch/pip) (#99)
* add initial patch mask features * minor edit to bern-cell * fixed bernoulli error cell * example rate cell test * made some corrections to bern err-cell and heb syn * made some corrections to bern err-cell and heb syn * cleaned up bern-cell, hebb-syn * minor mod to model-utils * attempted rewrite of bernoulli-cell * got bernoulli-cell rewritten and unit-tested * edit to bern-cell * bernoulli and poisson cells revised, unit-tested * latency-cell refactored and unit-tested * refactored Rate Cell * minor revisions to input-encoders, revised phasor-cell w/ unit-test * revised and add unit-test for varTrace * revised and added unit-test for exp-kernel * revised and added unit-test for exp-kernel * revised slif cell w/ unit-test; needed mod to diffeq * revised slif-cell w/ unit-test; cleaned up ode_utils to play nicer w/ new sim-lib * revised lif-cell w/ unit-test * revised unit-tests to pass globally; some minor patches to phasor-cell and lif * minor cleanup of unit-test for phasor * revised if-cell w/ unit-test * revised if-cell w/ unit-test * revised quad-lif w/ unit-test * revised adex-cell w/ unit test, minor cleanup of quad-lif * minor edit to adex unit-test * refactor bernoulli, laplacian, and rewarderror cells * revised raf-cell w/ unit test; fixed typos/mistakes in all spiking cells * revised wtas-cell w/ unit test * revised fh-cell w/ unit test * revised izh-cell w/ unit test * patched ode_utils backend wrt jax, cleaned up unit-tests, added disable flag for phasor-cell * update rate cell * fix test rate cell * update test for bernoulli cell * update refactoring for gaussian error cell * update unit testing for all graded neurons * wrote+unit-test of hodgkin-huxley spike cell, minor tweaks/clean-up elsewhere * added rk2 support for H-H cell * update rate cell and fix bug of passing a tuple of (jax Array -- not hashable) to jax jit functions. Basically, simplify the codebase by using a hashmap of functions * update test rate cell * refactored dense and trace-stdp syn w/ unit-test * refactored exp-stdp syn w/ unit-test * refactored event-stdp w/ unit-test * cleanup of stdp-syn * refactored bcm syn w/ unit-test * refactored stp-syn with unit-test * cleaned up modulated * refactored mstdp-et syn w/ unit-test * refactored lava components to new sim-lib * refactored conv/hebb-conv syn w/ unit-test * refactored/revised hebb-deconv syn w/ unit-test * revised/refactored hebb/stdp conv/deconv syn w/ unit-tests * updated modeling doc to point to hodgkin-huxley cell * updated modeling docs * fixed typo in adex-cell tutorial doc * revised tutorials to reflect new sim-lib config/syntax * revised tutorials to reflect new sim-lib config/syntax * patched docs to reflect revisions/refactor * tweaked requirements in prep for major release * cleaned up a few unit tests to use deterministic syn init vals * mod to requirements * nudge toml to upcoming 2.0.0 * update to support docs in prep for 2.0.0 * update patched synapses and their test cases * cleaned up syn modeling doc * push hebbian synapse * push reinforce synapse * push np seed * patched minor prior None arg issue in hebb-syn * moved reinforce-syn to right spot * update reinforce synapse and testing * tweaked trace-stdp and mstdpet * patched mstdpet unit-test * update reinforce synapse and test cases * add reinforce synapse fix * minor mod to mstdpet * update test code for more than 1 steps * Updated monitors * patched tests to use process naming * Added wrapper for reset and advance_state * Added a JaxProcess Added Jax Process to allow for scanning over the process. * update the old rate cell * update old hebbian synapse * minor edit to if-cell * ported over adex tutorial to new ngclearn format * hh-cell supports rk4 integration * clean up and integrated hodgkin-huxley mini lesson in neurocog tutorials * Update jaxProcess.py Updated the jax process to allow for more configurations of inputs. * update working reinforce synapse * update correct reinforce and testing * update documentation * update features, documentation, and testing * update testing for REINFORCE cell * update code and test * update code * add clipping gradient to model utils * update reinforce cell to the new model utils clip * update test cases --------- Co-authored-by: Viet Dung Nguyen <[email protected]> Co-authored-by: Alexander Ororbia <[email protected]> Co-authored-by: Will Gebhardt <[email protected]>
1 parent b0b496a commit bbea397

File tree

144 files changed

+6327
-3004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+6327
-3004
lines changed

AUTHORS

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
# The email address is not required for organizations.
66

77
Core Team
8-
Alexander Ororbia <[email protected]>
9-
William Gebhardt <[email protected]>
10-
Viet Dung Nguyen <[email protected]>
11-
Ankur Mali <[email protected]>
8+
Alexander Ororbia <[email protected]>
9+
William Gebhardt <[email protected]>
10+
Viet Dung Nguyen <[email protected]>
11+
Ankur Mali <[email protected]>
12+
Faeze Habibi <[email protected]>
1213

1314
Contributors
1415
Maxbeth2 (Ohas)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ngc-learn requires:
3737
2) NumPy (>=1.26.0)
3838
3) SciPy (>=1.7.0)
3939
4) ngcsimlib (>=0.3.b4), (visit official page <a href="https://github.com/NACLab/ngc-sim-lib">here</a>)
40-
5) JAX (>= 0.4.18) (to enable GPU use, make sure to install one of the CUDA variants)
40+
5) JAX (>= 0.4.28) (to enable GPU use, make sure to install one of the CUDA variants)
4141
<!--
4242
5) scikit-learn (>=1.3.1) if using `ngclearn.utils.density`
4343
6) matplotlib (>=3.4.3) if using `ngclearn.utils.viz`
@@ -79,7 +79,7 @@ Python 3.11.4 (main, MONTH DAY YEAR, TIME) [GCC XX.X.X] on linux
7979
Type "help", "copyright", "credits" or "license" for more information.
8080
>>> import ngclearn
8181
>>> ngclearn.__version__
82-
'1.2b3'
82+
'2.0.0'
8383
```
8484

8585
<i>Note:</i> For access to the previous Tensorflow-2 version of ngc-learn (of
@@ -126,7 +126,7 @@ $ python install -e .
126126
</pre>
127127

128128
**Version:**<br>
129-
1.2.3-Beta <!-- -Alpha -->
129+
2.0.0 <!--1.2.3-Beta--> <!-- -Alpha -->
130130

131131
Author:
132132
Alexander G. Ororbia II<br>

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
html_logo = "images/ngc-learn-logo.png"
118118
html_theme_options = {
119119
'logo_only': True,
120-
'display_version': True,
120+
#'display_version': True,
121121
}
122122

123123
# def setup(app):

docs/modeling/input_encoders.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,18 @@ whereas lower intensity values yield later firing times.
7171
.. automethod:: reset
7272
:noindex:
7373
```
74+
75+
### Phasor Cell
76+
77+
This cell takes a real-valued pattern(s) and transforms it on-the-fly to
78+
a spike train composed of pulses emitted a regular interval.
79+
80+
```{eval-rst}
81+
.. autoclass:: ngclearn.components.PhasorCell
82+
:noindex:
83+
84+
.. automethod:: advance_state
85+
:noindex:
86+
.. automethod:: reset
87+
:noindex:
88+
```

docs/modeling/neurons.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,20 @@ fast spiking (FS), low-threshold spiking (LTS), and resonator (RZ) neurons.
228228
.. automethod:: reset
229229
:noindex:
230230
```
231+
232+
### The Hodgkin-Huxley Cell
233+
234+
This cell models dynamics over voltage `v` and three channels/gates (related to
235+
potassium and sodium activation/inactivation). This sophisticated cell system is,
236+
as a result, a set of four coupled differential equations and is driven by an appropriately configured set of biophysical constants/coefficients (default values of which have been set according to relevant source work).
237+
(Note that this cell supports either Euler or midpoint method / RK-2 integration.)
238+
239+
```{eval-rst}
240+
.. autoclass:: ngclearn.components.HodgkinHuxleyCell
241+
:noindex:
242+
243+
.. automethod:: advance_state
244+
:noindex:
245+
.. automethod:: reset
246+
:noindex:
247+
```

docs/modeling/synapses.md

Lines changed: 53 additions & 79 deletions
Large diffs are not rendered by default.

docs/museum/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ relevant, referenced publicly available ngc-learn simulation code.
1717
sparse_coding
1818
snn_dc
1919
snn_bfa
20+
sindy

docs/museum/sindy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ $\mathbf{ẏ} = -2.0\mathbf{x} - 0.1\mathbf{y}$
436436
= 2.000 𝑦 -0.100 𝑥
437437
= -0.100 𝑦 -2.000 𝑥
438438

439-
$[𝑦, 𝑦^2, 𝑥, 𝑥𝑦, 𝑥^2]$
439+
[𝑦, 𝑦^2, 𝑥, 𝑥𝑦, 𝑥^2]
440440
[[ 1.999 0. -0.100 0. 0.]
441441
[-0.099 0. -1.999 0. 0.]]
442442
```

docs/museum/snn_dc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ To use your saved model and examine its performance on the MNIST test-set, you
209209
can execute the evaluation script like so:
210210

211211
```console
212-
$ python analyze_dcsnn.py --dataX=../data/mnist/testX.npy --sample_idx=0
212+
$ python analyze_dcsnn.py --dataX=../../data/mnist/testX.npy --sample_idx=0
213213
```
214214

215215
while will produce a visualization of your DC-SNN's receptive fields (the

docs/source/ngclearn.components.input_encoders.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ ngclearn.components.input\_encoders.latencyCell module
2020
:undoc-members:
2121
:show-inheritance:
2222

23+
ngclearn.components.input\_encoders.phasorCell module
24+
-----------------------------------------------------
25+
26+
.. automodule:: ngclearn.components.input_encoders.phasorCell
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
2331
ngclearn.components.input\_encoders.poissonCell module
2432
------------------------------------------------------
2533

0 commit comments

Comments
 (0)