NumPy allowed · plain Python earns 10 bonus points
Softmax(logits) → probability distribution
Implement the actual index bookkeeping behind k-fold cross-validation -- the fold-size arithmetic and train/validation partitioning every CV loop is built on top of, independent of whatever model gets trained on each fold.
Implement k_fold_splits(n_samples, k): partition range(n_samples) into k contiguous folds of size n_samples//k (the first n_samples % k folds get one extra sample), then return k [train_indices, val_indices] pairs, one per fold held out as validation.
k_fold_splits(n_samples: int, k: int) -> list