텐서플로우:: ops:: UnsortedSegmentJoin
#include <string_ops.h> segment_ids 기준으로 inputs 요소들을 결합합니다.
요약
텐서의 세그먼트를 따라 문자열 조인을 계산합니다. segment_ids 의 랭크가 N 이고 data 의 랭크가 N+M 인 경우:
`output[i, k1...kM] = strings.join([data[j1...jN, k1...kM])`
여기서 조인은 segment_ids[j1...jN] = i인 모든 [j1...jN]에 대해 수행됩니다. 문자열은 행 우선 순서로 조인됩니다.
예를 들어:
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']논거:
- 범위: Scope 객체
- 입력: 결합될 입력값입니다.
- segment_ids: data.shape의 접두사를 가진 형태의 텐서입니다. 음수 세그먼트 ID는 지원되지 않습니다.
- num_segments: 스칼라 값입니다.
선택적 속성( Attrs 참조):
- separator: 결합 시 사용할 구분자입니다.
보고:
-
Output: 출력 텐서.
생성자와 소멸자 | |
|---|---|
UnsortedSegmentJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments) | |
UnsortedSegmentJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments, const UnsortedSegmentJoin::Attrs & attrs) |
공개 속성 | |
|---|---|
operation | |
output | |
공공 기능 | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
공개 정적 함수 | |
|---|---|
Separator (StringPiece x) | |
구조 | |
|---|---|
| 텐서플로우:: ops:: UnsortedSegmentJoin:: Attrs | UnsortedSegmentJoin 에 대한 선택적 속성 설정기입니다. |
공개 속성
작업
Operation operation
산출
::tensorflow::Output output
공공 기능
정렬되지 않은 세그먼트 조인
UnsortedSegmentJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input segment_ids, ::tensorflow::Input num_segments )
정렬되지 않은 세그먼트 조인
UnsortedSegmentJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input segment_ids, ::tensorflow::Input num_segments, const UnsortedSegmentJoin::Attrs & attrs )
마디
::tensorflow::Node * node() const
연산자::텐서플로우::입력
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
분리 기호
Attrs Separator( StringPiece x )