সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: QuantizeDownAndShrinkRange
#include <math_ops.h>
কোয়ান্টাইজড 'ইনপুট' টেনসরকে একটি নিম্ন-নির্ভুলতা 'আউটপুট'-এ রূপান্তর করুন, ব্যবহার করে।
সারাংশ
নিম্ন বিট গভীরতার ব্যবহার সর্বাধিক করার জন্য মানগুলির প্রকৃত বন্টন এবং সেই অনুযায়ী আউটপুট মিন এবং সর্বোচ্চ রেঞ্জ সামঞ্জস্য করা।
[input_min, input_max] হল স্কেলার ফ্লোট যা 'ইনপুট' ডেটার ফ্লোট ব্যাখ্যার জন্য পরিসীমা নির্দিষ্ট করে। উদাহরণস্বরূপ, যদি input_min হয় -1.0f এবং input_max হয় 1.0f, এবং আমরা quint16 কোয়ান্টাইজড ডেটা নিয়ে কাজ করছি, তাহলে 16-বিট ডেটার একটি 0 মানকে -1.0f হিসাবে ব্যাখ্যা করা উচিত এবং একটি 65535 মানে 1.0f।
এই অপারেটর ডেটাতে পাওয়া প্রকৃত ন্যূনতম এবং সর্বোচ্চ মানগুলি গণনা করে একটি কম বিট গভীরতা সহ একটি আউটপুটে যতটা সম্ভব নির্ভুলতা চাপানোর চেষ্টা করে। উদাহরণস্বরূপ, হতে পারে সেই quint16 ইনপুটটির কোনো মান 16,384-এর কম নয় এবং 49,152-এর চেয়ে বেশি নয়। তার মানে আসলে মাত্র অর্ধেক পরিসর প্রয়োজন, সমস্ত ফ্লোট ব্যাখ্যা -0.5f এবং 0.5f এর মধ্যে, তাই আমরা যদি ডেটাকে একটি কুইন্ট8 আউটপুটে সংকুচিত করতে চাই, আমরা তাত্ত্বিক -1.0f থেকে 1.0 এর পরিবর্তে সেই পরিসরটি ব্যবহার করতে পারি f যেটি ইনপুট মিন এবং সর্বোচ্চ দ্বারা প্রস্তাবিত।
অনুশীলনে, এটি QuantizedMatMul- এর মতো ক্রিয়াকলাপ থেকে আউটপুট নেওয়ার জন্য সবচেয়ে কার্যকর যা তাদের ইনপুটগুলির চেয়ে উচ্চতর বিট-গভীর আউটপুট তৈরি করতে পারে এবং বড় সম্ভাব্য আউটপুট রেঞ্জ থাকতে পারে, তবে বাস্তবে ইনপুট মানগুলির একটি বন্টন রয়েছে যা শুধুমাত্র একটি ছোট ভগ্নাংশ ব্যবহার করে। সম্ভাব্য পরিসীমা। এই অপারেটরে সেই আউটপুটটি খাওয়ানোর মাধ্যমে, আমরা ন্যূনতম নির্ভুলতার ক্ষতি সহ এটিকে 32 বিট থেকে 8-এ কমাতে পারি।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- input_min: ফ্লোট মান যা ন্যূনতম পরিমাপযুক্ত ইনপুট মান প্রতিনিধিত্ব করে।
- input_max: ফ্লোট মান যা সর্বাধিক পরিমাপযুক্ত ইনপুট মান উপস্থাপন করে।
- out_type: আউটপুটের ধরন। টিনপুটের চেয়ে কম গভীরতা হওয়া উচিত।
রিটার্ন:
-
Output
আউটপুট -
Output
আউটপুট_মিন: ফ্লোট মান যা ন্যূনতম পরিমাপযুক্ত আউটপুট মান উপস্থাপন করে। -
Output
আউটপুট_ম্যাক্স: ফ্লোট মান যা সর্বাধিক পরিমাপযুক্ত আউটপুট মান উপস্থাপন করে।
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::QuantizeDownAndShrinkRange Class Reference\n\ntensorflow::ops::QuantizeDownAndShrinkRange\n===========================================\n\n`#include \u003cmath_ops.h\u003e`\n\nConvert the quantized 'input' tensor into a lower-precision 'output', using the.\n\nSummary\n-------\n\nactual distribution of the values to maximize the usage of the lower bit depth and adjusting the output min and max ranges accordingly.\n\n\\[input_min, input_max\\] are scalar floats that specify the range for the float interpretation of the 'input' data. For example, if input_min is -1.0f and input_max is 1.0f, and we are dealing with quint16 quantized data, then a 0 value in the 16-bit data should be interpreted as -1.0f, and a 65535 means 1.0f.\n\nThis operator tries to squeeze as much precision as possible into an output with a lower bit depth by calculating the actual min and max values found in the data. For example, maybe that quint16 input has no values lower than 16,384 and none higher than 49,152. That means only half the range is actually needed, all the float interpretations are between -0.5f and 0.5f, so if we want to compress the data into a quint8 output, we can use that range rather than the theoretical -1.0f to 1.0f that is suggested by the input min and max.\n\nIn practice, this is most useful for taking output from operations like [QuantizedMatMul](/versions/r1.15/api_docs/cc/class/tensorflow/ops/quantized-mat-mul#classtensorflow_1_1ops_1_1_quantized_mat_mul) that can produce higher bit-depth outputs than their inputs and may have large potential output ranges, but in practice have a distribution of input values that only uses a small fraction of the possible range. By feeding that output into this operator, we can reduce it from 32 bits down to 8 with minimal loss of accuracy.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input_min: The float value that the minimum quantized input value represents.\n- input_max: The float value that the maximum quantized input value represents.\n- out_type: The type of the output. Should be a lower bit depth than Tinput.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_min: The float value that the minimum quantized output value represents.\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_max: The float value that the maximum quantized output value represents.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [QuantizeDownAndShrinkRange](#classtensorflow_1_1ops_1_1_quantize_down_and_shrink_range_1a19ee578c7b888e9aca48d291a1a0d5da)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_min, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_max, DataType out_type)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_quantize_down_and_shrink_range_1a3ab13cf6f6f7814f990022d1a49b3a99) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_quantize_down_and_shrink_range_1a02ce18813489b86884040f42ddcfca87) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_max](#classtensorflow_1_1ops_1_1_quantize_down_and_shrink_range_1a3c2857dfc27b8777dc82845ec0a4919a) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_min](#classtensorflow_1_1ops_1_1_quantize_down_and_shrink_range_1aa8dddbbd62576e4961029ce5ed846677) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\n### output_max\n\n```scdoc\n::tensorflow::Output output_max\n``` \n\n### output_min\n\n```scdoc\n::tensorflow::Output output_min\n``` \n\nPublic functions\n----------------\n\n### QuantizeDownAndShrinkRange\n\n```gdscript\n QuantizeDownAndShrinkRange(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input input_min,\n ::tensorflow::Input input_max,\n DataType out_type\n)\n```"]]