Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
tensoreflusso:: ops:: FakeQuantWithMinMaxVarsPerChannelGradient
#include <array_ops.h>
Calcola i gradienti per un'operazione FakeQuantWithMinMaxVarsPerChannel .
Riepilogo
Argomenti:
- scope: un oggetto Scope
- gradienti: i gradienti propagati all'indietro sopra l'operazione FakeQuantWithMinMaxVars , formano uno di:
[d]
, [b, d]
, [b, h, w, d]
. - input: i valori passati come input all'operazione FakeQuantWithMinMaxVars hanno la stessa forma
gradients
. min, max: intervallo di quantizzazione, float di forma [d]
.
Attributi facoltativi (vedi Attrs
):
- num_bits: la larghezza di bit della quantizzazione; dai 2 ai 16 anni compresi.
- narrow_range: indica se quantizzare in 2^num_bits - 1 valori distinti.
Resi:
-
Output
backprops_wrt_input: gradienti retropropagati rispetto agli input, hanno la stessa forma inputs
: gradients * (inputs >= min && inputs <= max)
. -
Output
backprop_wrt_min: gradienti retropropagati rispetto al parametro min, forma [d]
: sum_per_d(gradients * (inputs < min))
. -
Output
backprop_wrt_max: gradienti retropropagati rispetto al parametro massimo, forma [d]
: sum_per_d(gradients * (inputs > max))
.
Attributi pubblici
Funzioni pubbliche
Funzioni pubbliche statiche
Raggio ristretto
Attrs NarrowRange(
bool x
)
NumBits
Attrs NumBits(
int64 x
)
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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```"]]