সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: FakeQuantWithMinMaxVarsPerChannel
#include <array_ops.h>
জাল-পরিমাণ 'ইনপুট' টাইপ ফ্লোটের টেনসর এবং আকারগুলির মধ্যে একটি: [d]
,.
সারাংশ
[b, d]
[b, h, w, d]
প্রতি-চ্যানেল ফ্লোটস min
এবং max
আকারের মাধ্যমে [d]
থেকে 'আউটপুট' টেনসর inputs
মতো একই আকৃতির।
[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
মান প্রশিক্ষণের অনুমতি দেয়।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
রিটার্ন:
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
নোড
::tensorflow::Node * node() const
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const
পাবলিক স্ট্যাটিক ফাংশন
ন্যারোরেঞ্জ
Attrs NarrowRange(
bool x
)
NumBits
Attrs NumBits(
int64 x
)
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel Class Reference\n\ntensorflow::ops::FakeQuantWithMinMaxVarsPerChannel\n==================================================\n\n`#include \u003carray_ops.h\u003e`\n\nFake-quantize the 'inputs' tensor of type float and one of the shapes: `[d]`,.\n\nSummary\n-------\n\n`[b, d]``[b, h, w, d]` via per-channel floats `min` and `max` of shape `[d]` to 'outputs' tensor of same shape as `inputs`.\n\n`[min; max]` define the clamping range for the `inputs` data. `inputs` values are quantized into the quantization range (`[0; 2^num_bits - 1]` when `narrow_range` is false and `[1; 2^num_bits - 1]` when it is true) and then de-quantized and output as floats in `[min; max]` interval. `num_bits` is the bitwidth of the quantization; between 2 and 16, inclusive.\n\nBefore quantization, `min` and `max` values are adjusted with the following logic. It is suggested to have `min \u003c= 0 \u003c= max`. If `0` is not in the range of values, the behavior can be unexpected: If `0 \u003c min \u003c max`: `min_adj = 0` and `max_adj = max - min`. If `min \u003c max \u003c 0`: `min_adj = min - max` and `max_adj = 0`. If `min \u003c= 0 \u003c= max`: `scale = (max - min) / (2^num_bits - 1)`, `min_adj = scale * round(min / scale)` and `max_adj = max + min_adj - min`.\n\nThis operation has a gradient and thus allows for training `min` and `max` values.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The outputs tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [FakeQuantWithMinMaxVarsPerChannel](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1a6030177a230ce0707cc84d79780582a9)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` inputs, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` min, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max)` ||\n| [FakeQuantWithMinMaxVarsPerChannel](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1a757ed99cef8d6918b36881c63b277e37)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` inputs, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` min, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max, const `[FakeQuantWithMinMaxVarsPerChannel::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1aa47fa159b050ba6248ed92fab3b37c71) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [outputs](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1a045da04027810b223dfcd856f1a5aeb6) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1a8b5095141e6cd70ed955461ded03fed9)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1ac20c09de7bf22ed92c3c4e8779c91731)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1a1e190c4077dd2fc0e08d472ac85d044e)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [NarrowRange](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1a8988bcb74e45c0d5741dc23d48ff4218)`(bool x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1_1_attrs) |\n| [NumBits](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1a8e692f7bad00eea0472c6e277b38ca89)`(int64 x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::FakeQuantWithMinMaxVarsPerChannel::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel/attrs) | Optional attribute setters for [FakeQuantWithMinMaxVarsPerChannel](/versions/r2.1/api_docs/cc/class/tensorflow/ops/fake-quant-with-min-max-vars-per-channel#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### outputs\n\n```text\n::tensorflow::Output outputs\n``` \n\nPublic functions\n----------------\n\n### FakeQuantWithMinMaxVarsPerChannel\n\n```gdscript\n FakeQuantWithMinMaxVarsPerChannel(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input inputs,\n ::tensorflow::Input min,\n ::tensorflow::Input max\n)\n``` \n\n### FakeQuantWithMinMaxVarsPerChannel\n\n```gdscript\n FakeQuantWithMinMaxVarsPerChannel(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input inputs,\n ::tensorflow::Input min,\n ::tensorflow::Input max,\n const FakeQuantWithMinMaxVarsPerChannel::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### NarrowRange\n\n```text\nAttrs NarrowRange(\n bool x\n)\n``` \n\n### NumBits\n\n```text\nAttrs NumBits(\n int64 x\n)\n```"]]