Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
przepływ tensorowy:: ops:: FakeQuantWithMinMaxVarsPerChannelGradient
#include <array_ops.h>
Oblicz gradienty dla operacji FakeQuantWithMinMaxVarsPerChannel .
Streszczenie
Argumenty:
- zakres: Obiekt Scope
- gradienty: gradienty propagowane wstecznie powyżej operacji FakeQuantWithMinMaxVars , uformuj jeden z:
[d]
, [b, d]
, [b, h, w, d]
. - dane wejściowe: wartości przekazywane jako dane wejściowe do operacji FakeQuantWithMinMaxVars , kształt taki sam jak
gradients
. min, max: Przedział kwantyzacji, pływaki kształtu [d]
.
Opcjonalne atrybuty (patrz Attrs
):
- num_bits: Szerokość bitowa kwantyzacji; od 2 do 16 włącznie.
- wąski_zakres: Określa, czy kwantyzować na 2^num_bitów - 1 różne wartości.
Zwroty:
-
Output
backprops_wrt_input: Gradienty propagowane wstecznie z danymi wejściowymi, kształt taki sam jak inputs
: gradients * (inputs >= min && inputs <= max)
. -
Output
backprop_wrt_min: Gradienty propagowane wstecz wrt min parametr, kształt [d]
: sum_per_d(gradients * (inputs < min))
. -
Output
backprop_wrt_max: Gradienty propagowane wstecznie wrt max parametr, kształt [d]
: sum_per_d(gradients * (inputs > max))
.
Atrybuty publiczne
Funkcje publiczne
Publiczne funkcje statyczne
WąskiZakres
Attrs NarrowRange(
bool x
)
Liczba bitów
Attrs NumBits(
int64 x
)
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-27 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-27 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.3/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.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- gradients: Backpropagated gradients above the [FakeQuantWithMinMaxVars](/versions/r2.3/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.3/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.3/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.3/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.3/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.3/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.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` gradients, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` inputs, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` min, ::`[tensorflow::Input](/versions/r2.3/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.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` gradients, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` inputs, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` min, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max, const `[FakeQuantWithMinMaxVarsPerChannelGradient::Attrs](/versions/r2.3/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.3/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.3/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.3/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.3/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.3/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.3/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.3/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-vars-per-channel-gradient/attrs) | Optional attribute setters for [FakeQuantWithMinMaxVarsPerChannelGradient](/versions/r2.3/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```"]]