Solved by ptrblck in post #2 
              
              
                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(…