tf.compat.v1.reduce_join

Joins all strings into a single string, or joins along an axis.

This is the reduction operation for the elementwise tf.strings.join op.

tf.strings.reduce_join([['abc','123'],
                        ['def','456']]).numpy()
b'abc123def456'
tf.strings.reduce_join([['abc','123'],
                        ['def','456']], axis=-1).numpy()
array([b'abc123', b'def456'], dtype=object)
tf.strings.reduce_join([['abc','123'],
                        ['def','456']],
                       axis=-1,
                       separator=" ").numpy()
array([b'abc 123', b'def 456'], dtype=object)

inputsA tf.string tensor.
axisWhich axis to join along. The default behavior is to join all elements, producing a scalar.
keepdimsIf true, retains reduced dimensions with length 1.
separatora string added between each string being joined.
nameA name for the operation (optional).

A tf.string tensor.