tensorflow:: אופס:: AsString

#include <string_ops.h>

ממירה כל ערך בטנזור הנתון למחרוזות.

סיכום

תומך בסוגים מספריים רבים ובוליאניים.

עבור Unicode, ראה את [ https://www.tensorflow.org/tutorials/representation/unicode ](עבודה עם טקסט Unicode).

דוגמאות:

tf.strings.as_string([3, 2]) tf.strings.as_string([3.1415926, 2.71828], precision=2).numpy() array([b'3.14', b'2.72'], dtype=object)

טיעונים:

  • scope: אובייקט Scope

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

  • דיוק: הדיוק הפוסט-עשרוני לשימוש עבור מספרי נקודה צפה. משמש רק אם דיוק > -1.
  • מדעי: השתמש בסימון מדעי למספרי נקודה צפה.
  • הקצר ביותר: השתמש בייצוג הקצר ביותר (בין אם מדעי או סטנדרטי) עבור מספרי נקודה צפה.
  • רוחב: רפד מספרים טרום-עשרוניים לרוחב זה. חל הן על נקודה צפה והן על מספרים שלמים. משמש רק אם רוחב > -1.
  • fill: הערך שיש לרפד אם רוחב > -1. אם ריקים, רפידות עם רווחים. ערך טיפוסי נוסף הוא '0'. מחרוזת לא יכולה להיות ארוכה מתו אחד.

החזרות:

  • Output : טנסור הפלט.

בנאים והורסים

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

תכונות ציבוריות

operation
output

תפקידים ציבוריים

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

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

Fill (StringPiece x)
Precision (int64 x)
Scientific (bool x)
Shortest (bool x)
Width (int64 x)

מבנים

tensorflow:: ops:: AsString:: Attrs

קובעי תכונות אופציונליים עבור AsString .

תכונות ציבוריות

מבצע

Operation operation

תְפוּקָה

::tensorflow::Output output

תפקידים ציבוריים

AsString

 AsString(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input
)

AsString

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

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const 

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

למלא

Attrs Fill(
  StringPiece x
)

דיוק

Attrs Precision(
  int64 x
)

מַדָעִי

Attrs Scientific(
  bool x
)

הכי קצר

Attrs Shortest(
  bool x
)

רוֹחַב

Attrs Width(
  int64 x
)