Google I/O에 참여해 주셔서 감사합니다. 주문형 모든 세션 보기 주문형 시청

tensorflow :: ops :: StringSplit

#include <string_ops.h>

delimiter 를 기반으로 input 요소를 SparseTensor 로 분할합니다.

요약

N을 소스의 크기라고합니다 (일반적으로 N은 배치 크기입니다). delimiter 기반으로 input 각 요소를 분할하고 분할 된 토큰을 포함하는 SparseTensor 를 반환합니다. 토큰은 무시됩니다.

delimiter 는 비어 있거나 분할 된 문자열 일 수 있습니다. delimiter 가 빈 문자열 인 경우 input 각 요소는 UTF-8 멀티 바이트 시퀀스 분할을 포함하여 개별 단일 바이트 문자열로 분할됩니다. 그렇지 않으면 delimiter 모든 문자가 잠재적 인 분할 지점이됩니다.

예 : N = 2, input [0]은 'hello world'이고 input [1]은 'ab c'이면 출력은 다음과 같습니다.

인덱스 = [0, 0; 0, 1; 1, 0; 1, 1; 1, 2] shape = [2, 3] values ​​= [ 'hello', 'world', 'a', 'b', 'c']

인수 :

  • 범위 : 범위 개체
  • 입력 : 1-D. 분할 할 문자열입니다.
  • 구분자 : 0-D. 구분 문자 (바이트) 또는 빈 문자열.

선택적 속성 ( Attrs 참조) :

  • skip_empty : bool . True 이면 결과에서 빈 문자열을 건너 뜁니다.

보고:

  • Output 인덱스 : 희소 텐서의 인덱스를 나타내는 int64의 조밀 한 행렬입니다.
  • Output 값 : 분할 된 값에 해당하는 문자열의 벡터입니다.
  • Output 모양 : 희소 텐서의 모양을 나타내는 int64의 길이 -2 벡터입니다. 여기서 첫 번째 값은 N이고 두 번째 값은 단일 입력 항목의 최대 토큰 수입니다.

생성자와 소멸자

StringSplit (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input delimiter)
StringSplit (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input delimiter, const StringSplit::Attrs & attrs)

공용 속성

indices
operation
shape
values

공개 정적 함수

SkipEmpty (bool x)

구조체

tensorflow :: ops :: StringSplit :: Attrs

StringSplit에 대한 선택적 속성 설정자.

공용 속성

지수

::tensorflow::Output indices

조작

Operation operation

모양

::tensorflow::Output shape

가치

::tensorflow::Output values

공공 기능

StringSplit

 StringSplit(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input delimiter
)

StringSplit

 StringSplit(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input delimiter,
  const StringSplit::Attrs & attrs
)

공개 정적 함수

SkipEmpty

Attrs SkipEmpty(
  bool x
)