onnx
onnx copied to clipboard
Why does SplitToSequence not allow zeros in `split` input?
Question
The ONNX 1.18.0 documentation says that for operator SplitToSequence:
‘split’ must contain only positive numbers.
Why are zeros not allowed? The semantics for zeros seems unambiguous, and it seems like they should be allowed per the principle of least surprise.
@gramalingam
SplitToSequence does allow zeros in the split input. The documentation later says:
Length of each output. It can be either a scalar(tensor of empty shape), or a 1-D tensor. All values must be >= 0.
So the phrase "positive numbers" was presumably intended to include zero. The data type is tensor(int32) or tensor(int64) so the qualification is needed because those data types allow negative numbers.