tensorflow :: অপস:: 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)

কাঠামো

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
)

নোড

::tensorflow::Node * node() const 

অপারেটর::টেনসরফ্লো::ইনপুট

 operator::tensorflow::Input() const 

অপারেটর::টেনসরফ্লো::আউটপুট

 operator::tensorflow::Output() const 

পাবলিক স্ট্যাটিক ফাংশন

সংকীর্ণ পরিসর

Attrs NarrowRange(
  bool x
)

NumBits

Attrs NumBits(
  int64 x
)