컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: FakeQuantWithMinMaxArgs
#include <array_ops.h>
'입력' 텐서를 가짜 양자화하고, 동일한 유형의 '출력' 텐서에 float를 입력합니다.
요약
속성 [min; max]
inputs
데이터의 클램핑 범위를 정의합니다. inputs
값은 양자화 범위( narrow_range
false인 경우 [0; 2^num_bits - 1]
, true인 경우 [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
.
출력이 여전히 부동 소수점이므로 양자화를 가짜라고 합니다.
인수:
보고:
공개 속성
공공 기능
마디
::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 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# tensorflow::ops::FakeQuantWithMinMaxArgs Class Reference\n\ntensorflow::ops::FakeQuantWithMinMaxArgs\n========================================\n\n`#include \u003carray_ops.h\u003e`\n\nFake-quantize the 'inputs' tensor, type float to 'outputs' tensor of same type.\n\nSummary\n-------\n\nAttributes `[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\nQuantization is called fake since the output is still in floating point.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The outputs tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [FakeQuantWithMinMaxArgs](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a85e03d1dc3cd4bc32cd221b7b9cf6d9a)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` inputs)` ||\n| [FakeQuantWithMinMaxArgs](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a5a50c94e0d72103df198cd3f00bed13d)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` inputs, const `[FakeQuantWithMinMaxArgs::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-args/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a74ebb70c787d9ab49c7e4f6a25a1caba) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [outputs](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a9f9cb032ade7705f0b4a03b0ab94cb0c) | `::`[tensorflow::Output](/versions/r2.2/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_args_1adf0a81f8d2e49f0bf4eb5859fac39168)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a51cf8e44b3b26ce30a5016a440b99c69)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a614548643c093eefd86990ce72baece3)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Max](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a5e82983f6429be0078510aea65c1593b)`(float x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-args/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1_1_attrs) |\n| [Min](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a3fd5bd826632651830791d26c59fb56f)`(float x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-args/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1_1_attrs) |\n| [NarrowRange](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a9af5fd9211a71acf844cf8d911fde2ac)`(bool x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-args/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1_1_attrs) |\n| [NumBits](#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1a80f557e9c790845a7e5c910bae0ef5fd)`(int64 x)` | [Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-args/attrs#structtensorflow_1_1ops_1_1_fake_quant_with_min_max_args_1_1_attrs) |\n\n| ### Structs ||\n|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::FakeQuantWithMinMaxArgs::Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/fake-quant-with-min-max-args/attrs) | Optional attribute setters for [FakeQuantWithMinMaxArgs](/versions/r2.2/api_docs/cc/class/tensorflow/ops/fake-quant-with-min-max-args#classtensorflow_1_1ops_1_1_fake_quant_with_min_max_args). |\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### FakeQuantWithMinMaxArgs\n\n```gdscript\n FakeQuantWithMinMaxArgs(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input inputs\n)\n``` \n\n### FakeQuantWithMinMaxArgs\n\n```gdscript\n FakeQuantWithMinMaxArgs(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input inputs,\n const FakeQuantWithMinMaxArgs::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### Max\n\n```text\nAttrs Max(\n float x\n)\n``` \n\n### Min\n\n```text\nAttrs Min(\n float x\n)\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```"]]