The creation of the indices looks wrong and you could check if by using:
data = np.zeros(100)
valid_size = 0.2
test_size = 0.1
indices = np.arange(len(data))

split = int(np.floor(valid_size * len(data)))
train_idx, valid_idx = indices[split:], indices[:split]

split = int(np.floor(test_size * len(valid_idx)))
valid_idx, test_idx = indices[split:], indices[:split]

Here you can see that train_idx and valid_idx overlap, since you are using indices in the second split again.
The common approach would be to split the dataset into the training and validation indices first, and then split the validation indices into the final validation and test indices again.