Not sure how to get only the last three items:
class MyDataset(Dataset):
    def __init__(self,remove_list):
        self.cifar10 = datasets.CIFAR10(root='./data',

                                        download=False,
                                        train=True,
                                        transform=transform)
        self.data = self.cifar10.data
        
        self.targets = self.cifar10.targets
        self.final_data, self.final_targets = self.__remove__(remove_list)
    
      
    def __getitem__(self, index):
        data, target = self.final_data2[index], self.final_targets[index]
        
        return data, target, index

    def __len__(self):
        return len(self.final_data)

    def __remove__(self, remove_list):
        data = np.delete(self.data, remove_list, axis=0)        
        targets = np.delete(self.targets, remove_list, axis=0)
        
        return data, targets

mydataset = MyDataset([])
trainloader = DataLoader(mydataset, batch_size=254, num_workers=8)


class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.conv_layer1 = nn.Sequential(
            nn.Conv2d(in_channels=3, out_channels=32, kernel_size=3, stride=2),
            nn.BatchNorm2d(32),
            nn.ReLU()
        )
        self.conv_layer2 = nn.Sequential(
            nn.Conv2d(in_channels=32, out_channels=64, kernel_size=3, stride=1),
            nn.BatchNorm2d(64),
            nn.ReLU()
        )

        self.conv_layer3 = nn.Sequential(
            nn.Conv2d(in_channels=64, out_channels=128, kernel_size=3, stride=1),
            nn.BatchNorm2d(128),
            nn.ReLU()
        )

        self.conv_layer4 = nn.Sequential(
            nn.Conv2d(in_channels=128, out_channels=128, kernel_size=3, stride=2),
            nn.BatchNorm2d(128),
            nn.ReLU()
        )

        self.fc_layer = nn.Sequential(
            nn.Linear(25*128,10)
        )
   

    def forward(self, x):
        out = self.conv_layer1(x)
        out = self.conv_layer2(out)
        out = self.conv_layer3(out)
        out = self.conv_layer4(out)
        out = out.reshape(out.size(0), -1)
        out = self.fc_layer(out)
        return out