ReduceJoin

public final class ReduceJoin

Joins a string Tensor across the given dimensions.

Computes the string join across dimensions in the given string Tensor of shape `[\\(d_0, d_1, ..., d_{n-1}\\)]`. Returns a new Tensor created by joining the input strings with the given separator (default: empty string). Negative indices are counted backwards from the end, with `-1` being equivalent to `n - 1`. If indices are not specified, joins across all dimensions beginning from `n - 1` through `0`.

For example:

# 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"
 

Nested Classes

class ReduceJoin.Options Optional attributes for ReduceJoin  

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

Output<TString>
asOutput()
Returns the symbolic handle of the tensor.
static ReduceJoin
create(Scope scope, Operand<TString> inputs, Operand<TInt32> reductionIndices, Options... options)
Factory method to create a class wrapping a new ReduceJoin operation.
static ReduceJoin.Options
keepDims(Boolean keepDims)
Output<TString>
output()
Has shape equal to that of the input with reduced dimensions removed or set to `1` depending on `keep_dims`.
static ReduceJoin.Options
separator(String separator)

Inherited Methods

org.tensorflow.op.RawOp
final boolean
equals(Object obj)
final int
Operation
op()
Return this unit of computation as a single Operation.
final String
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
org.tensorflow.op.Op
abstract ExecutionEnvironment
env()
Return the execution environment this op was created in.
abstract Operation
op()
Return this unit of computation as a single Operation.
org.tensorflow.Operand
abstract Output<TString>
asOutput()
Returns the symbolic handle of the tensor.
abstract TString
asTensor()
Returns the tensor at this operand.
abstract Shape
shape()
Returns the (possibly partially known) shape of the tensor referred to by the Output of this operand.
abstract Class<TString>
type()
Returns the tensor type of this operand
org.tensorflow.ndarray.Shaped
abstract int
rank()
abstract Shape
shape()
abstract long
size()
Computes and returns the total size of this container, in number of values.

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "ReduceJoin"

Public Methods

public Output<TString> asOutput ()

Returns the symbolic handle of the tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static ReduceJoin create (Scope scope, Operand<TString> inputs, Operand<TInt32> reductionIndices, Options... options)

Factory method to create a class wrapping a new ReduceJoin operation.

Parameters
scope current scope
inputs The input to be joined. All reduced indices must have non-zero size.
reductionIndices The dimensions to reduce over. Dimensions are reduced in the order specified. Omitting `reduction_indices` is equivalent to passing `[n-1, n-2, ..., 0]`. Negative indices from `-n` to `-1` are supported.
options carries optional attributes values
Returns
  • a new instance of ReduceJoin

public static ReduceJoin.Options keepDims (Boolean keepDims)

Parameters
keepDims If `True`, retain reduced dimensions with length `1`.

public Output<TString> output ()

Has shape equal to that of the input with reduced dimensions removed or set to `1` depending on `keep_dims`.

public static ReduceJoin.Options separator (String separator)

Parameters
separator The separator to use when joining.