NMNIST#

class tonic.datasets.NMNIST(save_to: str, train: bool = True, first_saccade_only: bool = False, stabilize: bool = False, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, transforms: Optional[Callable] = None)[source]#

N-MNIST

Events have (xytp) ordering.

@article{orchard2015converting,
  title={Converting static image datasets to spiking neuromorphic datasets using saccades},
  author={Orchard, Garrick and Jayawant, Ajinkya and Cohen, Gregory K and Thakor, Nitish},
  journal={Frontiers in neuroscience},
  volume={9},
  pages={437},
  year={2015},
  publisher={Frontiers}
}
Parameters:
  • save_to (string) – Location to save files to on disk.

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

  • first_saccade_only (bool) – If True, only work with events of the first of three saccades. Results in about a third of the events overall.

  • stabilize (bool) – If True, it stabilizes egomotion of the saccades, centering the digit.

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

  • target_transform (callable, optional) – A callable of transforms to apply to the targets/labels.

  • transforms (callable, optional) – A callable of transforms that is applied to both data and labels at the same time.

__getitem__(index)[source]#
Returns:

a tuple of (events, target) where target is the index of the target class.