tensorflow:: אופס:: FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>
בצע כימות מזויפות של טנסור ה'כניסות' מסוג צף באמצעות צפים לכל ערוץ.
תַקצִיר
לכמת מזויף את טנסור inputs
מסוג צף לכל ערוץ ואחת הצורות: [d]
, [b, d]
[b, h, w, d]
באמצעות צפים לכל ערוץ min
max
של צורה [d]
ל 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)
andmax_adj = max + min_adj - min
.
לפעולה זו יש שיפוע ובכך מאפשרת אימון ערכי min
max
.
טיעונים:
- scope: אובייקט Scope
החזרות:
-
Output
: טנזור הפלטים.
בנאים והורסים | |
---|---|
FakeQuantWithMinMaxVarsPerChannel (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max) | |
FakeQuantWithMinMaxVarsPerChannel (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input min, :: tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs) |
תכונות ציבוריות | |
---|---|
operation | |
outputs |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
NarrowRange (bool x) | |
NumBits (int64 x) |
מבנים | |
---|---|
tensorflow:: ops:: FakeQuantWithMinMaxVarsPerChannel:: Attrs | קובעי תכונות אופציונליים עבור FakeQuantWithMinMaxVarsPerChannel . |
תכונות ציבוריות
מִבצָע
Operation operation
תפוקות
::tensorflow::Output outputs
תפקידים ציבוריים
FakeQuantWithMinMaxVarsPerChannel
FakeQuantWithMinMaxVarsPerChannel( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max )
FakeQuantWithMinMaxVarsPerChannel
FakeQuantWithMinMaxVarsPerChannel( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input min, ::tensorflow::Input max, const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs )