tf.compat.v1.sparse_split

View source on GitHub

Split a SparseTensor into num_split tensors along axis. (deprecated arguments)

tf.compat.v1.sparse_split(
    keyword_required=KeywordRequired(), sp_input=None, num_split=None, axis=None,
    name=None, split_dim=None
)

Warning: SOME ARGUMENTS ARE DEPRECATED: (split_dim). They will be removed in a future version. Instructions for updating: split_dim is deprecated, use axis instead

If the sp_input.dense_shape[axis] is not an integer multiple of num_split each slice starting from 0:shape[axis] % num_split gets extra one dimension. For example, if axis = 1 and num_split = 2 and the input is:

input_tensor = shape = [2, 7]
[    a   d e  ]
[b c          ]

Graphically the output tensors are:

output_tensor[0] =
[    a   ]
[b c     ]

output_tensor[1] =
[ d e  ]
[      ]

Args:

Returns:

num_split SparseTensor objects resulting from splitting value.

Raises: