tensorflow:: ops:: FakeQuantWithMinMaxVars
#include <array_ops.h> গ্লোবাল ফ্লোট স্কেলার min ব্যবহার করে ফ্লোট টাইপের 'ইনপুটস' টেনসরকে ফেক-কোয়ান্টাইজ করুন।
সারসংক্ষেপ
এবং inputs মতো একই আকারের 'আউটপুট' টেনসরের max ।
[min; max] inputs ডেটার জন্য ক্ল্যাম্পিং রেঞ্জ নির্ধারণ করে। inputs মানগুলিকে কোয়ান্টাইজেশন রেঞ্জের মধ্যে কোয়ান্টাইজ করা হয় ( [0; 2^num_bits - 1] যখন narrow_range false এবং [1; 2^num_bits - 1] যখন এটি true) এবং তারপর ডি-কোয়ান্টাইজ করে [min; max] ব্যবধানে ফ্লোট হিসাবে আউটপুট দেওয়া হয়। num_bits হল কোয়ান্টাইজেশনের বিটউইডথ; যা ২ থেকে ১৬ এর মধ্যে।
কোয়ান্টাইজেশনের আগে, 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 )
নামবিটস
Attrs NumBits( int64 x )