‘Dataset’ here is an abstract class defined in torch.utils.data which should be subclassed when creating a custom dataset class - https://pytorch.org/docs/stable/data.html?highlight=dataset#torch.utils.data.Dataset 34.

binary_mnist = BinaryMNIST()
train_loader = torch.utils.data.DataLoader(binary_mnist, batch_size=batch_size, shuffle=True)


You can do dir(Data_tr) to check for the attributes. It has two variables - train_data and train_labels.
Assign them accordingly inside init method.

self.images, self.labels = Data_tr.train_data, Data_tr.train_labels

Check out this link for dataset/dataloader tutorial:
https://pytorch.org/tutorials/beginner/data_loading_tutorial.html 18