Improve documentation and error message for tf.split
This function previously stated that it could accept a rank-0 Tensor as its `num_or_size_splits` argument. This is in fact not correct: TF graphs must have a static number of output tensors for any operation, so the number of splits has to be known statically or we cannot validate the correctness of the graph. This method will now raise a ValueError if called with a rank-0 Tensor. I also make the documentation more explicit. Strangely, the test was testing for the incorrect behaviour, so I also fixed that. PiperOrigin-RevId: 235157900
Loading
Please sign in to comment