:py:mod:`tonic.datasets.hsd`
============================

.. py:module:: tonic.datasets.hsd


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   tonic.datasets.hsd.HSD
   tonic.datasets.hsd.SHD
   tonic.datasets.hsd.SSC




.. py:class:: HSD(save_to: str, transform: collections.abc.Callable | None = None, target_transform: collections.abc.Callable | None = None, transforms: collections.abc.Callable | None = None)


   Bases: :py:obj:`tonic.dataset.Dataset`

   Heidelberg Spiking Dataset <https://arxiv.org/abs/1910.07407> contains the Spiking
   Heidelberg Digits (SHD) and the Spiking Speech Commands dataset (SSC).

   .. py:attribute:: base_url
      :value: 'https://zenkelab.org/datasets/'

      

   .. py:attribute:: sensor_size
      :value: (700, 1, 1)

      

   .. py:attribute:: dtype

      

   .. py:attribute:: ordering

      

   .. py:method:: __getitem__(index)


   .. py:method:: __len__()



.. py:class:: SHD(save_to: str, train: bool = True, transform: collections.abc.Callable | None = None, target_transform: collections.abc.Callable | None = None)


   Bases: :py:obj:`HSD`

   `Spiking Heidelberg Digits <https://zenkelab.org/resources/spiking-heidelberg-datasets-shd/>`_
   ::

       @article{cramer2020heidelberg,
         title={The heidelberg spiking data sets for the systematic evaluation of spiking neural networks},
         author={Cramer, Benjamin and Stradmann, Yannik and Schemmel, Johannes and Zenke, Friedemann},
         journal={IEEE Transactions on Neural Networks and Learning Systems},
         year={2020},
         publisher={IEEE}
       }

   :param save_to: Location to save files to on disk. Will put files in an 'hsd' subfolder.
   :type save_to: string
   :param train: If True, uses training subset, otherwise testing subset.
   :type train: bool
   :param transform: A callable of transforms to apply to the data.
   :type transform: callable, optional
   :param target_transform: A callable of transforms to apply to the targets/labels.
   :type target_transform: callable, optional

   :returns: A dataset object that can be indexed or iterated over. One sample returns a tuple of (events, targets).

   .. py:property:: speaker


   .. py:attribute:: test_zip
      :value: 'shd_test.h5.zip'

      

   .. py:attribute:: train_zip
      :value: 'shd_train.h5.zip'

      

   .. py:attribute:: test_md5
      :value: '1503a5064faa34311c398fb0a1ed0a6f'

      

   .. py:attribute:: train_md5
      :value: 'f3252aeb598ac776c1b526422d90eecb'

      

   .. py:attribute:: folder_name
      :value: ''

      


.. py:class:: SSC(save_to: str, split: str = 'train', transform: collections.abc.Callable | None = None, target_transform: collections.abc.Callable | None = None)


   Bases: :py:obj:`HSD`

   `Spiking Speech Commands <https://zenkelab.org/resources/spiking-heidelberg-datasets-shd/>`_
   ::

       @article{cramer2020heidelberg,
         title={The heidelberg spiking data sets for the systematic evaluation of spiking neural networks},
         author={Cramer, Benjamin and Stradmann, Yannik and Schemmel, Johannes and Zenke, Friedemann},
         journal={IEEE Transactions on Neural Networks and Learning Systems},
         year={2020},
         publisher={IEEE}
       }

   :param save_to: Location to save files to on disk. Will put files in an 'hsd' subfolder.
   :type save_to: string
   :param split: One of 'train', 'test' or 'valid'.
   :type split: string
   :param transform: A callable of transforms to apply to the data.
   :type transform: callable, optional
   :param target_transform: A callable of transforms to apply to the targets/labels.
   :type target_transform: callable, optional

   :returns: A dataset object that can be indexed or iterated over. One sample returns a tuple of (events, targets).

   .. py:attribute:: test_zip
      :value: 'ssc_test.h5.zip'

      

   .. py:attribute:: train_zip
      :value: 'ssc_train.h5.zip'

      

   .. py:attribute:: valid_zip
      :value: 'ssc_valid.h5.zip'

      

   .. py:attribute:: test_md5
      :value: 'a35ff1e9cffdd02a20eb850c17c37748'

      

   .. py:attribute:: train_md5
      :value: 'd102be95e7144fcc0553d1f45ba94170'

      

   .. py:attribute:: valid_md5
      :value: 'b4eee3516a4a90dd0c71a6ac23a8ae43'

      

   .. py:attribute:: folder_name
      :value: ''

      


