跨给定维度连接字符串张量。
用法
tf.raw_ops.ReduceJoin(
inputs, reduction_indices, keep_dims=False, separator='', name=None
)参数
-
inputsTensor类型为string。要加入的输入。所有缩减的索引必须具有非零大小。 -
reduction_indicesTensor类型为int32。要减少的尺寸。尺寸按指定的顺序缩小。省略reduction_indices等同于传递[n-1, n-2, ..., 0]。支持从-n到-1的负索引。 -
keep_dims可选的bool。默认为False。如果True,保留长度为1的缩减维度。 -
separator可选的string。默认为""。加入时使用的分隔符。 -
name操作的名称(可选)。
返回
-
Tensor类型为string。
计算形状为 [\\(d_0, d_1, ..., d_{n-1}\\)] 的给定字符串张量中跨维度的字符串连接。返回通过使用给定分隔符连接输入字符串创建的新张量(默认值:空字符串)。负索引从末尾向后计数,-1 等同于 n - 1 。如果未指定索引,则连接从 n - 1 到 0 的所有维度。
例如:
# tensor `a` is [["a", "b"], ["c", "d"]]
tf.reduce_join(a, 0) ==> ["ac", "bd"]
tf.reduce_join(a, 1) ==> ["ab", "cd"]
tf.reduce_join(a, -2) = tf.reduce_join(a, 0) ==> ["ac", "bd"]
tf.reduce_join(a, -1) = tf.reduce_join(a, 1) ==> ["ab", "cd"]
tf.reduce_join(a, 0, keep_dims=True) ==> [["ac", "bd"]]
tf.reduce_join(a, 1, keep_dims=True) ==> [["ab"], ["cd"]]
tf.reduce_join(a, 0, separator=".") ==> ["a.c", "b.d"]
tf.reduce_join(a, [0, 1]) ==> "acbd"
tf.reduce_join(a, [1, 0]) ==> "abcd"
tf.reduce_join(a, []) ==> [["a", "b"], ["c", "d"]]
tf.reduce_join(a) = tf.reduce_join(a, [1, 0]) ==> "abcd"
相关用法
- Python tf.raw_ops.ResourceScatterNdSub用法及代码示例
- Python tf.raw_ops.ReadVariableXlaSplitND用法及代码示例
- Python tf.raw_ops.ResourceScatterMul用法及代码示例
- Python tf.raw_ops.Real用法及代码示例
- Python tf.raw_ops.ResourceScatterAdd用法及代码示例
- Python tf.raw_ops.ResourceScatterMax用法及代码示例
- Python tf.raw_ops.ResourceScatterMin用法及代码示例
- Python tf.raw_ops.Relu用法及代码示例
- Python tf.raw_ops.ReverseV2用法及代码示例
- Python tf.raw_ops.ResourceGather用法及代码示例
- Python tf.raw_ops.Reverse用法及代码示例
- Python tf.raw_ops.Reshape用法及代码示例
- Python tf.raw_ops.ResourceScatterNdAdd用法及代码示例
- Python tf.raw_ops.ResourceScatterNdUpdate用法及代码示例
- Python tf.raw_ops.ResourceScatterSub用法及代码示例
- Python tf.raw_ops.ResourceScatterUpdate用法及代码示例
- Python tf.raw_ops.ResourceScatterDiv用法及代码示例
- Python tf.raw_ops.RegexFullMatch用法及代码示例
- Python tf.raw_ops.ReverseSequence用法及代码示例
- Python tf.raw_ops.RaggedGather用法及代码示例
注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.raw_ops.ReduceJoin。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
