टेंसरफ़्लो:: ऑप्स:: FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>प्रति-चैनल फ़्लोट के माध्यम से फ़्लोट प्रकार के 'इनपुट' टेंसर को नकली-मात्राबद्ध करें।
सारांश
प्रति-चैनल फ्लोट प्रकार और आकृतियों में से एक के inputs टेंसर को नकली-मात्राबद्ध करें: [d] , [b, d] [b, h, w, d] प्रति-चैनल फ्लोट्स min और max आकार के माध्यम से [d] से inputs के समान आकार का outputs टेंसर।
गुण
-
[min; max]inputsडेटा के लिए क्लैंपिंग रेंज को परिभाषित करें। -
inputsमानों को क्वांटिज़ेशन रेंज में परिमाणित किया जाता है ([0; 2^num_bits - 1]जबnarrow_rangeगलत है और[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)औरmax_adj = max + min_adj - min।
इस ऑपरेशन में एक ग्रेडिएंट है और इस प्रकार min और max मानों को प्रशिक्षित करने की अनुमति मिलती है।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
रिटर्न:
-
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) | |
संरचनाएँ | |
|---|---|
| टेंसरफ़्लो:: ऑप्स:: 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 )
नोड
::tensorflow::Node * node() const
ऑपरेटर::टेन्सरफ़्लो::इनपुट
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
सार्वजनिक स्थैतिक कार्य
संकीर्ण रेंज
Attrs NarrowRange( bool x )
संख्या बिट्स
Attrs NumBits( int64 x )