
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/layers/plot_exp_leaky.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download_auto_examples_layers_plot_exp_leaky.py>`
        to download the full example code

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_layers_plot_exp_leaky.py:


=================================
Exponential Leaky Layer (ExpLeak)
=================================
:class:`~sinabs.layers.ExpLeak` layer.

.. GENERATED FROM PYTHON SOURCE LINES 7-18



.. image-sg:: /auto_examples/layers/images/sphx_glr_plot_exp_leaky_001.png
   :alt: ExpLeak neuron dynamics
   :srcset: /auto_examples/layers/images/sphx_glr_plot_exp_leaky_001.png
   :class: sphx-glr-single-img





.. code-block:: default


    import torch
    from utils import plot_evolution

    import sinabs.layers as sl

    const_current = torch.ones((1, 100, 1)) * 0.03


    exp_leak_neuron = sl.ExpLeak(tau_mem=60.0, record_states=True)
    plot_evolution(exp_leak_neuron, const_current)


.. rst-class:: sphx-glr-timing

   **Total running time of the script:** ( 0 minutes  0.192 seconds)


.. _sphx_glr_download_auto_examples_layers_plot_exp_leaky.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example


    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: plot_exp_leaky.py <plot_exp_leaky.py>`

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: plot_exp_leaky.ipynb <plot_exp_leaky.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
