Commit 9d508106 authored by James Keeling's avatar James Keeling Committed by TensorFlower Gardener
Browse files

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
parent c4cec011
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment