SMNIST#

class tonic.datasets.SMNIST(save_to, train=True, duplicate=True, num_neurons=99, dt=1000.0, transform=None, target_transform=None)[source]#

Spiking sequential 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.

Parameters:
  • save_to (string) – Location to save files to on disk.

  • train (bool) – If True, uses training subset, otherwise testing subset.

  • duplicate (bool) – If True, emits two spikes per threshold crossing

  • num_neurons (integer) – How many neurons to use to encode thresholds(must be odd)

  • dt (float) – Duration(in microseconds) of each timestep

  • transform (callable, optional) – A callable of transforms to apply to the data.

  • target_transform – A callable of transforms to apply to the targets/labels.