tf.strings.split
lines = tf.strings.split(line, '\n')
输入是list格式
输出是一个SparseTensorValue对象
SparseTensorValue(indices,
values=array( ,dtype),
dense_shape)
拿结果
lines.values
本文介绍如何使用TensorFlow中的tf.strings.split方法将字符串按指定分隔符进行拆分。通过示例展示输入为list格式时,如何得到SparseTensorValue对象,并解析其结构,最后获取所需的拆分结果。
tf.strings.split
lines = tf.strings.split(line, '\n')
输入是list格式
输出是一个SparseTensorValue对象
SparseTensorValue(indices,
values=array( ,dtype),
dense_shape)
拿结果
lines.values
3673

被折叠的 条评论
为什么被折叠?