Deployed 545a4d6 with MkDocs version: 1.6.1

This commit is contained in:
F.M. Quintana Velazquez committed 2026-02-27 18:04:31 +01:00
1 parent 36cf66478e
commit 44d35df672
4 files changed
+13 -33

No files matched your search

+1 -1
View File
@@ -1026,7 +1026,7 @@
<p>For GPU acceleration with CUDA 13:</p> <p>For GPU acceleration with CUDA 13:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>uv<span class="w"> </span>sync<span class="w"> </span>--extra<span class="w"> </span>cuda <div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>uv<span class="w"> </span>sync<span class="w"> </span>--extra<span class="w"> </span>cuda
</span></code></pre></div> </span></code></pre></div>
<p>See the <a href="scripts/examples/neuron_models/">examples</a> directory for more detailed usage examples.</p> <p>See the <a href="https://github.com/bics-rug/felice-models/tree/main/scripts/examples/neuron_models">examples</a> directory for more detailed usage examples.</p>
+5 -30
View File
@@ -820,36 +820,6 @@
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#circuit-equation" class="md-nav__link">
<span class="md-ellipsis">
Circuit equation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#examples" class="md-nav__link">
<span class="md-ellipsis">
Examples
</span>
</a>
</li>
</ul>
</nav> </nav>
</div> </div>
</div> </div>
@@ -932,6 +902,11 @@
<h1 id="fitzhugh-nagumo">FitzHugh-Nagumo</h1> <h1 id="fitzhugh-nagumo">FitzHugh-Nagumo</h1>
<h1 id="circuit-implementing-the-fhn-neuron">Circuit implementing the fhn neuron.</h1>
<ul>
<li>The circuits in the schematics implement the FHN neuron described.</li>
<li>The FHN neuron is an implementation of the circuit described in (Ribar, L. (2019). Synthesis of neuromorphic circuits with neuromodulatory properties [Apollo - University of Cambridge Repository]. <a href="https://doi.org/10.17863/CAM.53750">DOI: 10.17863/CAM.53750</a>). The OTA and CMFB are well known designs that can be found in textbooks.</li>
</ul>
<h2 id="circuit-equation">Circuit equation</h2> <h2 id="circuit-equation">Circuit equation</h2>
<div class="arithmatex">\[ <div class="arithmatex">\[
\begin{align} \begin{align}
+6 -1
View File
@@ -1111,7 +1111,7 @@
<p>For GPU acceleration with CUDA 13:</p> <p>For GPU acceleration with CUDA 13:</p>
<div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#index-__codelineno-1-1"></a>uv<span class="w"> </span>sync<span class="w"> </span>--extra<span class="w"> </span>cuda <div class="language-bash highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#index-__codelineno-1-1"></a>uv<span class="w"> </span>sync<span class="w"> </span>--extra<span class="w"> </span>cuda
</span></code></pre></div> </span></code></pre></div>
<p>See the <a href="#scripts-examples-neuron_models">examples</a> directory for more detailed usage examples.</p></section> <p>See the <a href="https://github.com/bics-rug/felice-models/tree/main/scripts/examples/neuron_models">examples</a> directory for more detailed usage examples.</p></section>
<section class='print-page md-section' id='section-2' heading-number='2'> <section class='print-page md-section' id='section-2' heading-number='2'>
<h1>Neuron Models<a class='headerlink' href='#section-2' title='Permanent link'></a> <h1>Neuron Models<a class='headerlink' href='#section-2' title='Permanent link'></a>
</h1> </h1>
@@ -2380,6 +2380,11 @@ def plot_vf(ax, snn, u_range, v_range):
<h1>FitzHugh-Nagumo<a class='headerlink' href='#section-2-3' title='Permanent link'></a> <h1>FitzHugh-Nagumo<a class='headerlink' href='#section-2-3' title='Permanent link'></a>
</h1> </h1>
<section class="print-page" id="neuron_models-fhn" heading-number="2.3.1"><h1 id="neuron_models-fhn-fitzhugh-nagumo">FitzHugh-Nagumo</h1> <section class="print-page" id="neuron_models-fhn" heading-number="2.3.1"><h1 id="neuron_models-fhn-fitzhugh-nagumo">FitzHugh-Nagumo</h1>
<h1 id="neuron_models-fhn-circuit-implementing-the-fhn-neuron">Circuit implementing the fhn neuron.</h1>
<ul>
<li>The circuits in the schematics implement the FHN neuron described.</li>
<li>The FHN neuron is an implementation of the circuit described in (Ribar, L. (2019). Synthesis of neuromorphic circuits with neuromodulatory properties [Apollo - University of Cambridge Repository]. <a href="https://doi.org/10.17863/CAM.53750">DOI: 10.17863/CAM.53750</a>). The OTA and CMFB are well known designs that can be found in textbooks.</li>
</ul>
<h2 id="neuron_models-fhn-circuit-equation">Circuit equation</h2> <h2 id="neuron_models-fhn-circuit-equation">Circuit equation</h2>
<div class="arithmatex">\[ <div class="arithmatex">\[
\begin{align} \begin{align}
+1 -1
View File
@@ -1 +1 @@
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Felice","text":"<p>This project provides a JAX implementation of the different neuron models in felice</p>"},{"location":"#overview","title":"Overview","text":"<p>The framework is built on top of diffrax and leverages JAX's automatic differentiation for efficient simulation and training of analogue models.</p>"},{"location":"#key-features","title":"Key Features","text":"<ul> <li>Delay learning</li> <li>Non-linear neuron models<ul> <li>WereRabbit Neuron Model: Implementation of a dual-state oscillatory neuron model with bistable dynamics</li> <li>FHN Neuron Model</li> <li>Snowball Neuron Model</li> </ul> </li> </ul>"},{"location":"#installation","title":"\ud83d\udce6 Installation","text":"<p>Felice uses uv for dependency management. To install:</p> <pre><code>uv sync\n</code></pre>"},{"location":"#cuda-support-optional","title":"CUDA Support (Optional)","text":"<p>For GPU acceleration with CUDA 13:</p> <pre><code>uv sync --extra cuda\n</code></pre> <p>See the examples directory for more detailed usage examples.</p>"},{"location":"api/","title":"API Reference","text":"<p>API documentation for Felice.</p>"},{"location":"api/#modules","title":"Modules","text":"<ul> <li>Neuron Models - Neuron model implementations</li> <li>Solver - Zero-clipping solver</li> <li>Datasets - Built-in datasets</li> </ul>"},{"location":"api/datasets/","title":"Datasets","text":""},{"location":"api/datasets/#felice.datasets","title":"<code>felice.datasets</code>","text":""},{"location":"api/neuron_models/","title":"Neuron Models","text":""},{"location":"api/neuron_models/#felice.neuron_models","title":"<code>felice.neuron_models</code>","text":""},{"location":"api/neuron_models/#felice.neuron_models-classes","title":"Classes","text":""},{"location":"api/neuron_models/#felice.neuron_models.Boomerang","title":"<code>Boomerang</code>","text":"<p> Bases: <code>Module</code></p> Source code in <code>felice/neuron_models/boomerang.py</code> <pre><code>class Boomerang(eqx.Module):\n rtol: float = eqx.field(static=True)\n atol: float = eqx.field(static=True)\n\n u0: float = eqx.field(static=True)\n v0: float = eqx.field(static=True)\n\n alpha: float = eqx.field(static=True) # I_n0 / I_bias ratio\n beta: float = eqx.field(static=True) # k / U_t (inverse thermal scale)\n gamma: float = eqx.field(static=True) # coupling coefficient\n rho: float = eqx.field(static=True) # tanh steepness\n sigma: float = eqx.field(static=True) # bias scaling (s * I_bias)\n\n dtype: DTypeLike = eqx.field(static=True)\n\n def __init__(\n self,\n *,\n atol: float = 1e-6,\n rtol: float = 1e-4,\n alpha: float = 0.0129,\n beta: float = 15.6,\n gamma: float = 0.26,\n rho: float = 30.0,\n sigma: float = 0.6,\n dtype: DTypeLike = jnp.float32,\n ):\n r\"\"\"Initialize the WereRabbit neuron model.\n\n Args:\n key: JAX random key for weight initialization.\n n_neurons: Number of neurons in this layer.\n in_size: Number of input connections (excluding recurrent connections).\n wmask: Binary mask defining connectivity pattern of shape (in_plus_neurons, neurons).\n rtol: Relative tolerance for the spiking fixpoint calculation.\n atol: Absolute tolerance for the spiking fixpoint calculation.\n alpha: Current scaling parameter $\\alpha = I_{n0}/I_{bias}$ (default: 0.0129)\n beta: Exponential slope $\\beta = \\kappa/U_t$ (default: 15.6)\n gamma: Coupling parameter $\\gamma = 26e^{-2}$\n rho: Steepness of the tanh function $\\rho$ (default: 5)\n sigma: Fixpoint distance scaling $\\sigma$ (default: 0.6)\n wlim: Limit for weight initialization. If None, uses init_weights.\n wmean: Mean value for weight initialization.\n init_weights: Optional initial weight values. If None, weights are randomly initialized.\n fan_in_mode: Mode for fan-in based weight initialization ('sqrt', 'linear').\n dtype: Data type for arrays (default: float32).\n \"\"\"\n self.dtype = dtype\n\n self.alpha = alpha\n self.beta = beta\n self.gamma = gamma\n self.rho = rho\n self.sigma = sigma\n\n self.rtol = rtol\n self.atol = atol\n\n def fn(y, _):\n return self.vector_field(y[0], y[1])\n\n solver: optx.AbstractRootFinder = optx.Newton(rtol=1e-8, atol=1e-8)\n y0 = (jnp.array(0.3), jnp.array(0.3))\n u0, v0 = optx.root_find(fn, solver, y0).value\n self.u0 = u0.item()\n self.v0 = v0.item()\n\n def init_state(self, n_neurons: int) -&gt; Float[Array, \"neurons 2\"]:\n \"\"\"Initialize the neurLine truncated {"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"Felice","text":"<p>This project provides a JAX implementation of the different neuron models in felice</p>"},{"location":"#overview","title":"Overview","text":"<p>The framework is built on top of diffrax and leverages JAX's automatic differentiation for efficient simulation and training of analogue models.</p>"},{"location":"#key-features","title":"Key Features","text":"<ul> <li>Delay learning</li> <li>Non-linear neuron models<ul> <li>WereRabbit Neuron Model: Implementation of a dual-state oscillatory neuron model with bistable dynamics</li> <li>FHN Neuron Model</li> <li>Snowball Neuron Model</li> </ul> </li> </ul>"},{"location":"#installation","title":"\ud83d\udce6 Installation","text":"<p>Felice uses uv for dependency management. To install:</p> <pre><code>uv sync\n</code></pre>"},{"location":"#cuda-support-optional","title":"CUDA Support (Optional)","text":"<p>For GPU acceleration with CUDA 13:</p> <pre><code>uv sync --extra cuda\n</code></pre> <p>See the examples directory for more detailed usage examples.</p>"},{"location":"api/","title":"API Reference","text":"<p>API documentation for Felice.</p>"},{"location":"api/#modules","title":"Modules","text":"<ul> <li>Neuron Models - Neuron model implementations</li> <li>Solver - Zero-clipping solver</li> <li>Datasets - Built-in datasets</li> </ul>"},{"location":"api/datasets/","title":"Datasets","text":""},{"location":"api/datasets/#felice.datasets","title":"<code>felice.datasets</code>","text":""},{"location":"api/neuron_models/","title":"Neuron Models","text":""},{"location":"api/neuron_models/#felice.neuron_models","title":"<code>felice.neuron_models</code>","text":""},{"location":"api/neuron_models/#felice.neuron_models-classes","title":"Classes","text":""},{"location":"api/neuron_models/#felice.neuron_models.Boomerang","title":"<code>Boomerang</code>","text":"<p> Bases: <code>Module</code></p> Source code in <code>felice/neuron_models/boomerang.py</code> <pre><code>class Boomerang(eqx.Module):\n rtol: float = eqx.field(static=True)\n atol: float = eqx.field(static=True)\n\n u0: float = eqx.field(static=True)\n v0: float = eqx.field(static=True)\n\n alpha: float = eqx.field(static=True) # I_n0 / I_bias ratio\n beta: float = eqx.field(static=True) # k / U_t (inverse thermal scale)\n gamma: float = eqx.field(static=True) # coupling coefficient\n rho: float = eqx.field(static=True) # tanh steepness\n sigma: float = eqx.field(static=True) # bias scaling (s * I_bias)\n\n dtype: DTypeLike = eqx.field(static=True)\n\n def __init__(\n self,\n *,\n atol: float = 1e-6,\n rtol: float = 1e-4,\n alpha: float = 0.0129,\n beta: float = 15.6,\n gamma: float = 0.26,\n rho: float = 30.0,\n sigma: float = 0.6,\n dtype: DTypeLike = jnp.float32,\n ):\n r\"\"\"Initialize the WereRabbit neuron model.\n\n Args:\n key: JAX random key for weight initialization.\n n_neurons: Number of neurons in this layer.\n in_size: Number of input connections (excluding recurrent connections).\n wmask: Binary mask defining connectivity pattern of shape (in_plus_neurons, neurons).\n rtol: Relative tolerance for the spiking fixpoint calculation.\n atol: Absolute tolerance for the spiking fixpoint calculation.\n alpha: Current scaling parameter $\\alpha = I_{n0}/I_{bias}$ (default: 0.0129)\n beta: Exponential slope $\\beta = \\kappa/U_t$ (default: 15.6)\n gamma: Coupling parameter $\\gamma = 26e^{-2}$\n rho: Steepness of the tanh function $\\rho$ (default: 5)\n sigma: Fixpoint distance scaling $\\sigma$ (default: 0.6)\n wlim: Limit for weight initialization. If None, uses init_weights.\n wmean: Mean value for weight initialization.\n init_weights: Optional initial weight values. If None, weights are randomly initialized.\n fan_in_mode: Mode for fan-in based weight initialization ('sqrt', 'linear').\n dtype: Data type for arrays (default: float32).\n \"\"\"\n self.dtype = dtype\n\n self.alpha = alpha\n self.beta = beta\n self.gamma = gamma\n self.rho = rho\n self.sigma = sigma\n\n self.rtol = rtol\n self.atol = atol\n\n def fn(y, _):\n return self.vector_field(y[0], y[1])\n\n solver: optx.AbstractRootFinder = optx.Newton(rtol=1e-8, atol=1e-8)\n y0 = (jnp.array(0.3), jnp.array(0.3))\n u0, v0 = optx.root_find(fn, solver, y0).value\n self.u0 = u0.item()\n self.v0 = v0.item()\n\n def init_state(self, n_neurons: int) -&gt; Float[Array, \"neurons 2\"]:\n \"\"\"Initialize the neurLine truncated