텐서플로우:: 작전:: StringSplitV2

#include <string_ops.h>

sep 기반으로 source 요소를 SparseTensor 로 분할합니다.

요약

N을 소스의 크기로 설정합니다. 일반적으로 N은 배치 크기입니다. sep 기반으로 source 의 각 요소를 분할하고 분할 토큰이 포함된 SparseTensor 를 반환합니다. 토큰은 무시됩니다.

예를 들어 N = 2, source[0]은 'hello world'이고 source[1]은 'ab c'이면 출력은

st.indices = [0, 0;
              0, 1;
              1, 0;
              1, 1;
              1, 2]
st.shape = [2, 3]
st.values = ['hello', 'world', 'a', 'b', 'c']
입니다.

sep 가 주어지면 연속 구분 기호는 함께 그룹화되지 않으며 빈 문자열을 구분하는 것으로 간주됩니다. 예를 들어, "1\<\>2\<\>\<\>3" 의 소스와 "\<\>" 의 sep는 ["1", "2", "", "3"] 합니다. sep 가 None이거나 빈 문자열인 경우 연속 공백은 단일 구분 기호로 간주되며 문자열에 선행 또는 후행 공백이 있는 경우 결과에는 시작자 끝에 빈 문자열이 포함되지 않습니다.

위에서 언급한 동작은 Python의 str.split과 일치합니다.

인수:

  • 범위: 범위 개체
  • 입력: 1-D 문자열 Tensor , 분할할 문자열.
  • sep: 0-D 문자열 Tensor , 구분 문자입니다.

선택적 속성( Attrs 참조):

  • maxsplit: int . maxsplit > 0 이면 결과 분할이 제한됩니다.

보고:

생성자와 소멸자

StringSplitV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input sep)
StringSplitV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input sep, const StringSplitV2::Attrs & attrs)

공개 속성

indices
operation
shape
values

공개 정적 함수

Maxsplit (int64 x)

구조체

텐서플로우:: ops:: StringSplitV2:: 속성

StringSplitV2 에 대한 선택적 속성 설정자입니다.

공개 속성

지수

::tensorflow::Output indices

작업

Operation operation

모양

::tensorflow::Output shape

가치

::tensorflow::Output values

공공 기능

StringSplitV2

 StringSplitV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input sep
)

StringSplitV2

 StringSplitV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input sep,
  const StringSplitV2::Attrs & attrs
)

공개 정적 함수

맥스스플릿

Attrs Maxsplit(
  int64 x
)