Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
dòng chảy căng:: ôi:: FakeQuantWithMinMaxVarsPerChannelGradient
#include <array_ops.h>
Tính toán độ dốc cho hoạt động FakeQuantWithMinMaxVarsPerChannel .
Bản tóm tắt
Lập luận:
- phạm vi: Một đối tượng Phạm vi
- độ dốc: Độ dốc được truyền ngược phía trên hoạt động FakeQuantWithMinMaxVars , định hình một trong:
[d]
, [b, d]
, [b, h, w, d]
. - đầu vào: Các giá trị được chuyển làm đầu vào cho hoạt động FakeQuantWithMinMaxVars , có hình dạng giống như
gradients
. min, max: Khoảng lượng tử hóa, hình nổi [d]
.
Thuộc tính tùy chọn (xem Attrs
):
- num_bits: Độ rộng bit của lượng tử hóa; từ 2 đến 16, bao gồm.
- phạm vi hẹp: Có định lượng thành 2^num_bits hay không - 1 giá trị riêng biệt.
Trả về:
- Backprops_wrt_input
Output
: Các đầu vào có độ dốc được lan truyền ngược, có hình dạng giống như inputs
: gradients * (inputs >= min && inputs <= max)
. -
Output
backprop_wrt_min: Tham số gradient được lan truyền ngược wrt min, hình dạng [d]
: sum_per_d(gradients * (inputs < min))
. -
Output
backprop_wrt_max: Tham số tối đa của gradient được lan truyền ngược, hình dạng [d]
: sum_per_d(gradients * (inputs > max))
.
Thuộc tính công khai
Chức năng công cộng
Các hàm tĩnh công khai
Phạm vi hẹp
Attrs NarrowRange(
bool x
)
NumBits
Attrs NumBits(
int64 x
)
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::FakeQuantWithMinMaxVarsPerChannelGradient Class Reference\n\ntensorflow::ops::FakeQuantWithMinMaxVarsPerChannelGradient\n==========================================================\n\n`#include \u003carray_ops.h\u003e`\n\nCompute gradients for a [FakeQuantWithMinMaxVarsPerChannel](/versions/r2.0/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) operation.\n\nSummary\n-------\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- gradients: Backpropagated gradients above the [FakeQuantWithMinMaxVars](/versions/r2.0/api_docs/cc/class/tensorflow/ops/fake-quant-with-min-max-vars#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars) operation, shape one of: `[d]`, `[b, d]`, `[b, h, w, d]`.\n- inputs: Values passed as inputs to the [FakeQuantWithMinMaxVars](/versions/r2.0/api_docs/cc/class/tensorflow/ops/fake-quant-with-min-max-vars#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars) operation, shape same as `gradients`. min, max: Quantization interval, floats of shape `[d]`.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel-gradient/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1_1_attrs)):\n\n- num_bits: The bitwidth of the quantization; between 2 and 16, inclusive.\n- narrow_range: Whether to quantize into 2\\^num_bits - 1 distinct values.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) backprops_wrt_input: Backpropagated gradients w.r.t. inputs, shape same as `inputs`: `gradients * (inputs \u003e= min && inputs \u003c= max)`.\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) backprop_wrt_min: Backpropagated gradients w.r.t. min parameter, shape `[d]`: `sum_per_d(gradients * (inputs \u003c min))`.\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) backprop_wrt_max: Backpropagated gradients w.r.t. max parameter, shape `[d]`: `sum_per_d(gradients * (inputs \u003e max))`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [FakeQuantWithMinMaxVarsPerChannelGradient](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1a7521d0f809a9a2bab753031ec59937a1)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` gradients, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` inputs, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` min, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max)` ||\n| [FakeQuantWithMinMaxVarsPerChannelGradient](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1abf40f598a2e88d6f3a163fc6ac8c5a7d)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` gradients, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` inputs, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` min, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max, const `[FakeQuantWithMinMaxVarsPerChannelGradient::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel-gradient/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [backprop_wrt_max](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1acc9bf06f7b09f2437e913f6f32f6dfe0) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [backprop_wrt_min](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1ae7efb996b2e96e793a55decfaac3bfc4) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [backprops_wrt_input](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1a99d7e4cadd3a7b374e246edb6cc207fe) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1a2054be8cb0cdd3bc1c9721baa5cca289) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [NarrowRange](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1a027f51a466b8dcf2dbff757b15dc7200)`(bool x)` | [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel-gradient/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1_1_attrs) |\n| [NumBits](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1ad2357206b80cb845d85a727dcdd2d022)`(int64 x)` | [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel-gradient/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::FakeQuantWithMinMaxVarsPerChannelGradient::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel-gradient/attrs) | Optional attribute setters for [FakeQuantWithMinMaxVarsPerChannelGradient](/versions/r2.0/api_docs/cc/class/tensorflow/ops/fake-quant-with-min-max-vars-per-channel-gradient#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_vars_per_channel_gradient). |\n\nPublic attributes\n-----------------\n\n### backprop_wrt_max\n\n```scdoc\n::tensorflow::Output backprop_wrt_max\n``` \n\n### backprop_wrt_min\n\n```scdoc\n::tensorflow::Output backprop_wrt_min\n``` \n\n### backprops_wrt_input\n\n```scdoc\n::tensorflow::Output backprops_wrt_input\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### FakeQuantWithMinMaxVarsPerChannelGradient\n\n```gdscript\n FakeQuantWithMinMaxVarsPerChannelGradient(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input gradients,\n ::tensorflow::Input inputs,\n ::tensorflow::Input min,\n ::tensorflow::Input max\n)\n``` \n\n### FakeQuantWithMinMaxVarsPerChannelGradient\n\n```gdscript\n FakeQuantWithMinMaxVarsPerChannelGradient(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input gradients,\n ::tensorflow::Input inputs,\n ::tensorflow::Input min,\n ::tensorflow::Input max,\n const FakeQuantWithMinMaxVarsPerChannelGradient::Attrs & attrs\n)\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```"]]