tensorflow:: אופס:: StringSplitV2

#include <string_ops.h>

פיצול אלמנטים של source המבוססים על sep לתוך SparseTensor .

סיכום

תן ל-N להיות גודל המקור (בדרך כלל N יהיה גודל האצווה). פצל כל אלמנט של source על סמך sep והחזר SparseTensor המכיל את האסימונים המפוצלים. מתעלמים מאסימונים ריקים .

לדוגמה, N = 2, מקור[0] הוא 'שלום עולם' והמקור[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 או מחרוזת ריקה, רווח לבן רצוף נחשב כמפריד בודד, והתוצאה לא תכיל מחרוזות ריקות בקצה ההתחלה אם למחרוזת יש רווח לבן מוביל או נגרר.

שימו לב שההתנהגות שהוזכרה לעיל תואמת את str.split של python.

טיעונים:

  • scope: אובייקט Scope
  • קלט: מחרוזת 1-D Tensor , המיתרים לפצל.
  • sep: מחרוזת 0-D Tensor , תו המפריד.

מאפיינים אופציונליים (ראה Attrs ):

  • maxsplit: An 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)

מבנים

tensorflow:: ops:: StringSplitV2:: Attrs

קובעי תכונות אופציונליים עבור 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
)

פונקציות סטטיות ציבוריות

Maxsplit

Attrs Maxsplit(
  int64 x
)