并集和向量化
idx_all = torch.range(0, features.shape[0]-1, dtype=torch.long)
#标签向量化
label_onehot = torch.zeros(features.shape[0], labels.max() + 1)
value = torch.ones(idx_train.shape)
indices = (idx_train, labels[idx_train])
label_onehot.index_put_(indices, value)
#取并集
all_train = torch.cat((idx_all, idx_train))
uniques, counts = all_train.unique(return_counts=True)
idx_unlabeled = uniques[counts == 1]