tf.strings.split
Split elements of input based on sep.
tf.strings.split(
input=None, sep=None, maxsplit=-1, result_type='SparseTensor', source=None,
name=None
)
Let N be the size of input (typically N will be the batch size). Split each element of input based on sep and return a SparseTensor or RaggedTensor containing the split tokens. Empty tokens are ignored.
‘train/class_name/filename.jpg’‘train/class_name/filename.jpg’
[’ ‘train’ ‘class_name’ ‘filename.jpg’ ’
’ ‘train’ ‘class_name’ ‘filename.jpg’ ']
-2
[‘class_name’,‘class_name’]