brainpy.datasets.vision.EMNIST#

class brainpy.datasets.vision.EMNIST(root, split, **kwargs)[source]#

EMNIST Dataset.

Parameters
  • root (string) – Root directory of dataset where EMNIST/raw/train-images-idx3-ubyte and EMNIST/raw/t10k-images-idx3-ubyte exist.

  • split (string) – The dataset has 6 different splits: byclass, bymerge, balanced, letters, digits and mnist. This argument specifies which one to use.

  • train (bool, optional) – If True, creates dataset from training.pt, otherwise from test.pt.

  • download (bool, optional) – If True, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again.

  • transform (callable, optional) – A function/transform that takes in an PIL image and returns a transformed version. E.g, transforms.RandomCrop

  • target_transform (callable, optional) – A function/transform that takes in the target and transforms it.

__init__(root, split, **kwargs)[source]#

Methods

__init__(root, split, **kwargs)

download()

Download the EMNIST data if it doesn't exist already.

extra_repr()

rtype

str

Attributes

class_to_idx

rtype

Dict[str, int]

classes

classes_split_dict

images_file

rtype

str

labels_file

rtype

str

md5

mirrors

processed_folder

rtype

str

raw_folder

rtype

str

resources

splits

test_data

test_file

test_labels

train_data

train_labels

training_file

url