I think you should sort it out, I don’t know whether data_1 is instantiated dataset or dataloader throughout the article.
The error display is very clear. I did a minimal demo. Before asking questions, you can make a small demo that can be run. Many times, when you coding, this problem is solved in the process.
import torch 

class MyDataset(torch.utils.data.Dataset): 
    def __init__(self):
        data_x = torch.tensor([[1,2,3],[2,3,4]])
        data_y = torch.tensor([[3,4,5],[4,5,6]])
        self.data_concat = torch.utils.data.ConcatDataset((data_x,data_y))

    def __getitem__(self, index):
        return self.data_concat[index]

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

dataset_temp = MyDataset()

dataset_loader = torch.utils.data.DataLoader(dataset_temp)

for data in dataset_loader:
    print(data.max())