Pranavan_Theivendira:

    labels_total = torch.cat((labels_total, labels_shuffel[i]))



Hi,
You can slice if you know the indices. For example, you can slice the initial content of labels_total as follows. If the initial number of elements is N. You can just slice as follows.
labels_total_initial = labels_total[:N]

Likewise, you can slice other labels_shuffel contents in a similar way. For example, if you need all the label suffels. You can do the following.
labels_shuffels_prev = labels_total[N:]

Thanks