টেনসরফ্লো :: অপস:: FakeQuantWithMinMaxVars
#include <array_ops.h> গ্লোবাল ফ্লোট স্কেলারের মাধ্যমে ফ্লোটের টাইপের 'ইনপুট' টেনসরকে জাল-পরিমাণ min
সারাংশ
এবং inputs মতো একই আকৃতির max থেকে 'আউটপুট' টেনসর।
[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: আউটপুট টেনসর।
কনস্ট্রাক্টর এবং ডেস্ট্রাক্টর | |
|---|---|
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
অপারেটর::টেনসরফ্লো::ইনপুট
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const
পাবলিক স্ট্যাটিক ফাংশন
ন্যারোরেঞ্জ
Attrs NarrowRange( bool x )
NumBits
Attrs NumBits( int64 x )