@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class UnsortedSegmentJoin extends Pointer
inputs
based on segment_ids
.
Computes the string join along segments of a tensor.
Given segment_ids
with rank N
and data
with rank N+M
:
output[i, k1...kM] = strings.join([data[j1...jN, k1...kM])
where the join is over all [j1...jN] such that segment_ids[j1...jN] = i.
Strings are joined in row-major order.
For example:
python
inputs = [['Y', 'q', 'c'], ['Y', '6', '6'], ['p', 'G', 'a']]
output_array = string_ops.unsorted_segment_join(inputs=inputs,
segment_ids=[1, 0, 1],
num_segments=2,
separator=':'))
# output_array ==> [['Y', '6', '6'], ['Y:p', 'q:G', 'c:a']]
inputs = ['this', 'is', 'a', 'test']
output_array = string_ops.unsorted_segment_join(inputs=inputs,
segment_ids=[0, 0, 0, 0],
num_segments=1,
separator=':'))
# output_array ==> ['this:is:a:test']
Arguments:
* scope: A Scope object
* inputs: The input to be joined.
* segment_ids: A tensor whose shape is a prefix of data.shape. Negative segment ids are not
supported.
* num_segments: A scalar.
Optional attributes (see Attrs
):
* separator: The separator to use when joining.
Returns:
* Output
: The output tensor.Modifier and Type | Class and Description |
---|---|
static class |
UnsortedSegmentJoin.Attrs
Optional attribute setters for UnsortedSegmentJoin
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
UnsortedSegmentJoin(Pointer p)
Pointer cast constructor.
|
UnsortedSegmentJoin(Scope scope,
Input inputs,
Input segment_ids,
Input num_segments) |
UnsortedSegmentJoin(Scope scope,
Input inputs,
Input segment_ids,
Input num_segments,
UnsortedSegmentJoin.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
Node |
node() |
Operation |
operation() |
UnsortedSegmentJoin |
operation(Operation setter) |
Output |
output() |
UnsortedSegmentJoin |
output(Output setter) |
static UnsortedSegmentJoin.Attrs |
Separator(BytePointer x) |
static UnsortedSegmentJoin.Attrs |
Separator(String x) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public UnsortedSegmentJoin(Pointer p)
Pointer(Pointer)
.public UnsortedSegmentJoin(@Const @ByRef Scope scope, @ByVal Input inputs, @ByVal Input segment_ids, @ByVal Input num_segments)
public Node node()
@ByVal public static UnsortedSegmentJoin.Attrs Separator(@tensorflow.StringPiece BytePointer x)
@ByVal public static UnsortedSegmentJoin.Attrs Separator(@tensorflow.StringPiece String x)
public UnsortedSegmentJoin operation(Operation setter)
public UnsortedSegmentJoin output(Output setter)
Copyright © 2022. All rights reserved.