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

.. py:module:: tonic.datasets.s_mnist


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

Classes
~~~~~~~

.. autoapisummary::

   tonic.datasets.s_mnist.SMNIST




.. py:class:: SMNIST(save_to, train=True, duplicate=True, num_neurons=99, dt=1000.0, transform=None, target_transform=None)


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

   Spiking sequential `MNIST <http://yann.lecun.com/exdb/mnist/>`_

   Sequential MNIST (sMNIST) is a standard benchmark task for time series
   classification where each input consists of sequences of 784 pixel
   values created by unrolling the MNIST digits, pixel by pixel. In this
   spiking version, each of the 99 input neurons is associated with a
   particular threshold for the grey value, and this input neuron fires
   whenever the grey value crosses its threshold in the transition from
   the previous to the current pixel.

   :param save_to: Location to save files to on disk.
   :type save_to: string
   :param train: If True, uses training subset, otherwise testing subset.
   :type train: bool
   :param duplicate: If True, emits two spikes per threshold crossing
   :type duplicate: bool
   :param num_neurons: How many neurons to use to encode thresholds(must be odd)
   :type num_neurons: integer
   :param dt: Duration(in microseconds) of each timestep
   :type dt: float
   :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:: base_url
      :value: 'https://storage.googleapis.com/cvdf-datasets/mnist/'

      

   .. py:attribute:: train_images_file
      :value: 'train-images-idx3-ubyte'

      

   .. py:attribute:: train_labels_file
      :value: 'train-labels-idx1-ubyte'

      

   .. py:attribute:: test_images_file
      :value: 't10k-images-idx3-ubyte'

      

   .. py:attribute:: test_labels_file
      :value: 't10k-labels-idx1-ubyte'

      

   .. py:attribute:: train_images_md5
      :value: 'f68b3c2dcbeaaa9fbdd348bbdeb94873'

      

   .. py:attribute:: train_labels_md5
      :value: 'd53e105ee54ea40749a09fcbcd1e9432'

      

   .. py:attribute:: test_images_md5
      :value: '9fb629c4189551a2d022fa330f9573f3'

      

   .. py:attribute:: test_labels_md5
      :value: 'ec29112dd5afa0611ce80d1b7f02629c'

      

   .. py:attribute:: dtype

      

   .. py:attribute:: ordering

      

   .. py:attribute:: classes
      :value: ['0 - zero', '1 - one', '2 - two', '3 - three', '4 - four', '5 - five', '6 - six', '7 - seven',...

      

   .. py:method:: __getitem__(index)


   .. py:method:: __len__()


   .. py:method:: download()

      Downloads from a given url, places into target folder and verifies the file hash.



