Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions brainpy/state/_lif.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def __init__(
V_reset: ArrayLike = 0. * u.mV,
V_rest: ArrayLike = 0. * u.mV,
V_initializer: Callable = braintools.init.Constant(0. * u.mV),
noise: ArrayLike = None,
spk_fun: Callable = braintools.surrogate.ReluGrad(),
spk_reset: str = 'soft',
name: str = None,
Expand Down Expand Up @@ -279,8 +280,8 @@ def update(self, x=0. * u.mA):
V_th = self.V_th if self.spk_reset == 'soft' else jax.lax.stop_gradient(last_v)
V = last_v - (V_th - self.V_reset) * last_spk
# membrane potential
dv = lambda v: (-v + self.V_rest + self.R * self.sum_current_inputs(x, v)) / self.tau
V = brainstate.nn.exp_euler_step(dv, V)
dv = lambda v, t: (-v + self.V_rest + self.R * self.sum_current_inputs(x, v)) / self.tau
V = braintools.quad.ode_expeuler_step(dv, V, None)
V = self.sum_delta_inputs(V)
self.V.value = V
return self.get_spike(V)
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
print(f"Error deleting {item}: {e}")

build_version = os.environ.get('CURRENT_VERSION', 'v2')
build_version = os.environ.get('CURRENT_VERSION', 'v3')
if build_version == 'v2':
shutil.copytree(
os.path.join(os.path.dirname(__file__), '../docs_classic'),
Expand Down
112 changes: 0 additions & 112 deletions docs_state/README.md

This file was deleted.

11 changes: 5 additions & 6 deletions docs_state/api/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
API Reference
=============

Complete API reference for ``brainpy.state``
Complete API reference for ``brainpy.state``.

.. note::
``brainpy.state`` is built on top of `brainstate <https://brainstate.readthedocs.io/>`_,
Expand Down Expand Up @@ -49,10 +49,8 @@ The API is organized into the following categories:

Spike and current generators (PoissonSpike, SpikeTime)

Quick Reference
---------------

**Most commonly used classes:**
Example Reference
-----------------

Neurons
~~~~~~~
Expand Down Expand Up @@ -184,6 +182,7 @@ Readout Layers
brainpy.state.LeakySpikeReadout(in_size=100, tau=5*u.ms, V_th=1*u.mV)

.. toctree::
:hidden:
:maxdepth: 2

neurons
Expand All @@ -192,4 +191,4 @@ Readout Layers
synouts
stp
readouts
inputs
inputs
115 changes: 0 additions & 115 deletions docs_state/apis.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs_state/examples/gallery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ Series of models exploring different gamma generation mechanisms:
- Excitatory-inhibitory interaction


**Combined**: `Susin_Destexhe_2021_gamma_oscillation.py <https://github.com/brainpy/BrainPy/tree/master/examples_state/Susin_Destexhe_2021_gamma_oscillation.py>`_ - All mechanisms

**Key Concepts**: Gamma mechanisms, network states, oscillation generation

Spiking Neural Network Training
--------------------------------
Expand Down
3 changes: 1 addition & 2 deletions docs_state/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Learn more

.. card:: :material-regular:`data_exploration;2em` ``brainpy`` APIs
:class-card: sd-text-black sd-bg-light
:link: https://brainpy.readthedocs.io/
:link: https://brainpy.readthedocs.io


----
Expand All @@ -131,7 +131,6 @@ See also the ecosystem
:caption: Tutorials

quickstart/index.rst
tutorials/index.rst
examples/gallery.rst


Expand Down
Loading
Loading