tensorflow:: אופס:: FakeQuantWithMinMaxVars

#include <array_ops.h>

בצע כימות מזויפות של טנסור ה'קלט' מסוג צף באמצעות סקלרים גלובליים של ציפה.

סיכום

בצע כימות מזויף של טנסור inputs מסוג float באמצעות סקלרים גלובליים של float min max outputs פלטים באותו צורה כמו inputs .

תכונות

  • [min; max] מגדירים את טווח ההידוק עבור נתוני inputs .
  • ערכי inputs מקוונטים לטווח הכימות ( [0; 2^num_bits - 1] כאשר narrow_range הוא false ו- [1; 2^num_bits - 1] כאשר הוא נכון) ולאחר מכן דה-קוונטיזציה ומוצאת כצף ב- [min; max] מרווח.
  • num_bits הוא רוחב הסיביות של הקוונטיזציה; בין 2 ל-16, כולל.

לפני הקוונטיזציה, ערכי min max מותאמים לפי ההיגיון הבא. מומלץ לקבל min <= 0 <= max . אם 0 אינו בטווח הערכים, ההתנהגות יכולה להיות בלתי צפויה:

  • אם 0 < min < max : min_adj = 0 ו max_adj = max - min .
  • אם min < max < 0 : min_adj = min - max ו max_adj = 0 .
  • אם min <= 0 <= max : scale = (max - min) / (2^num_bits - 1) , min_adj = scale * round(min / scale) and max_adj = max + min_adj - min .

לפעולה זו יש שיפוע ובכך מאפשרת אימון ערכי min max .

טיעונים:

  • scope: אובייקט Scope

החזרות:

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

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

FakeQuantWithMinMaxVars (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max)
FakeQuantWithMinMaxVars (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max, const FakeQuantWithMinMaxVars::Attrs & attrs)

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

operation
outputs

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

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

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

NarrowRange (bool x)
NumBits (int64 x)

מבנים

tensorflow:: ops:: FakeQuantWithMinMaxVars:: Attrs

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

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

מבצע

Operation operation

תפוקות

::tensorflow::Output outputs

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

FakeQuantWithMinMaxVars

 FakeQuantWithMinMaxVars(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input min,
  ::tensorflow::Input max
)

FakeQuantWithMinMaxVars

 FakeQuantWithMinMaxVars(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input min,
  ::tensorflow::Input max,
  const FakeQuantWithMinMaxVars::Attrs & attrs
)

צוֹמֶת

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

טווח צר

Attrs NarrowRange(
  bool x
)

NumBits

Attrs NumBits(
  int64 x
)