11API Reference
22=============
33
4- Complete API reference for BrainPy 3.0.
4+ Complete API reference for `` brainpy.state ``
55
66.. note ::
7- BrainPy 3.0 is built on top of `brainstate <https://brainstate.readthedocs.io/ >`_,
7+ `` brainpy.state `` is built on top of `brainstate <https://brainstate.readthedocs.io/ >`_,
88 `brainunit <https://brainunit.readthedocs.io/ >`_, and `braintools <https://braintools.readthedocs.io/ >`_.
99
1010Organization
@@ -183,9 +183,6 @@ Readout Layers
183183 # Leaky spiking readout
184184 brainpy.state.LeakySpikeReadout(in_size = 100 , tau = 5 * u.ms, V_th = 1 * u.mV)
185185
186- Documentation Sections
187- ----------------------
188-
189186 .. toctree ::
190187 :maxdepth: 2
191188
@@ -195,68 +192,4 @@ Documentation Sections
195192 synouts
196193 stp
197194 readouts
198- inputs
199-
200- Import Structure
201- ----------------
202-
203- BrainPy uses a clear import hierarchy:
204-
205- .. code-block :: python
206-
207- import brainpy as bp # Core BrainPy
208- import brainstate # State management and modules
209- import brainunit as u # Physical units
210- import braintools # Training utilities
211-
212- # Neurons and synapses
213- neuron = brainpy.state.LIF(100 , ... )
214- synapse = brainpy.state.Expon.desc(100 , tau = 5 * u.ms)
215-
216- # State management
217- state = brainstate.ShortTermState(... )
218- brainstate.nn.init_all_states(net)
219-
220- # Units
221- current = 2.0 * u.nA
222- voltage = - 65 * u.mV
223- time = 10 * u.ms
224-
225- # Training
226- optimizer = braintools.optim.Adam(lr = 1e-3 )
227- loss = braintools.metric.softmax_cross_entropy(... )
228-
229- Type Conventions
230- ----------------
231-
232- **States: **
233-
234- - ``ShortTermState `` - Temporary dynamics (V, g, spikes)
235- - ``ParamState `` - Learnable parameters (weights, biases)
236- - ``LongTermState `` - Persistent statistics
237-
238- **Units: **
239-
240- All physical quantities use ``brainunit ``:
241-
242- - Voltage: ``u.mV ``
243- - Current: ``u.nA ``, ``u.pA ``
244- - Time: ``u.ms ``, ``u.second ``
245- - Conductance: ``u.mS ``, ``u.nS ``
246- - Concentration: ``u.mM ``
247-
248- **Shapes: **
249-
250- - Single trial: ``(n_neurons,) ``
251- - Batched: ``(batch_size, n_neurons) ``
252- - Connectivity: ``(n_pre, n_post) ``
253-
254- See Also
255- --------
256-
257- **External Documentation: **
258-
259- - `BrainState Documentation <https://brainstate.readthedocs.io/ >`_ - State management
260- - `BrainUnit Documentation <https://brainunit.readthedocs.io/ >`_ - Physical units
261- - `BrainTools Documentation <https://braintools.readthedocs.io/ >`_ - Training utilities
262- - `JAX Documentation <https://jax.readthedocs.io/ >`_ - Underlying computation
195+ inputs
0 commit comments