I am following the below approach-
train_data = torchvision.datasets.MNIST("./", train=True, transform=transforms.ToTensor(), download=True)
test_data_xy = torchvision.datasets.MNIST("./", train=False, transform=transforms.ToTensor(), download=True)
idx_train = train_data.train_labels!=5
idx_test= test_data_xy.train_labels!=5
train_data.train_labels = train_data .train_labels[idx_train]
test_data_xy.train_data = test_data_xy.train_data[idx_test]
Getting an error as-
AttributeError: can’t set attribute.
No clue what needs to be done