텐서플로우:: ops:: ReduceJoin

#include <string_ops.h>

주어진 차원에 걸쳐 문자열 텐서를 결합합니다.

요약

주어진 문자열 텐서 (형태: [\\(d_0, d_1, ..., d_{n-1}\\)] 에서 차원 간 문자열 조인을 계산합니다. [\\(d_0, d_1, ..., d_{n-1}\\)] 지정된 구분자(기본값: 빈 문자열)를 사용하여 입력 문자열을 결합하여 새 Tensor를 반환합니다 [\\(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"

논거:

  • 범위: Scope 객체
  • 입력: 결합할 입력입니다. 모든 축소된 인덱스는 0이 아닌 크기를 가져야 합니다.
  • reduction_indices: 축소할 차원입니다. 지정된 순서대로 차원이 축소됩니다. reduction_indices 생략하면 [n-1, n-2, ..., 0] 전달하는 것과 같습니다. -n 부터 -1 까지의 음수 인덱스가 지원됩니다.

선택적 속성( Attrs 참조):

  • keep_dims: True 경우, 길이가 1 인 축소된 차원을 유지합니다.
  • separator: 결합 시 사용할 구분자입니다.

보고:

  • Output : keep_dims 에 따라 축소된 차원이 제거되거나 1 로 설정되더라도 입력과 동일한 형태를 가집니다.

생성자와 소멸자

ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices)
ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices, const ReduceJoin::Attrs & attrs)

공개 속성

operation
output

공공 기능

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

공개 정적 함수

KeepDims (bool x)
Separator (StringPiece x)

구조

텐서플로우:: ops:: ReduceJoin:: Attrs

ReduceJoin 에 대한 선택적 속성 설정기입니다.

공개 속성

작업

Operation operation

산출

::tensorflow::Output output

공공 기능

리듀스조인

 ReduceJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input reduction_indices
)

리듀스조인

 ReduceJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input reduction_indices,
  const ReduceJoin::Attrs & attrs
)

마디

::tensorflow::Node * node() const 

연산자::텐서플로우::입력

 operator::tensorflow::Input() const 

연산자::텐서플로우::출력

 operator::tensorflow::Output() const 

공개 정적 함수

KeepDims

Attrs KeepDims(
  bool x
)

분리 기호

Attrs Separator(
  StringPiece x
)