Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::QuantizeAndDequantizeV4::Attrs
#include <array_ops.h>
Optional attribute setters for QuantizeAndDequantizeV4.
Summary
Public functions
|
Axis(int64 x)
|
If specified, this axis is treated as a channel or slice axis, and a separate quantization range is used for each channel or slice along this axis.
|
NarrowRange(bool x)
|
If True, then the absolute value of the quantized minimum value is the same as the quantized maximum value, instead of 1 greater.
|
NumBits(int64 x)
|
The bitwidth of the quantization.
|
RangeGiven(bool x)
|
Whether the range is given or should be determined from the input tensor.
|
RoundMode(StringPiece x)
|
The 'round_mode' attribute controls which rounding tie-breaking algorithm is used when rounding float values to their quantized equivalents.
|
SignedInput(bool x)
|
Whether the quantization is signed or unsigned.
|
Public attributes
axis_
int64 tensorflow::ops::QuantizeAndDequantizeV4::Attrs::axis_ = -1
narrow_range_
bool tensorflow::ops::QuantizeAndDequantizeV4::Attrs::narrow_range_ = false
num_bits_
int64 tensorflow::ops::QuantizeAndDequantizeV4::Attrs::num_bits_ = 8
range_given_
bool tensorflow::ops::QuantizeAndDequantizeV4::Attrs::range_given_ = false
round_mode_
StringPiece tensorflow::ops::QuantizeAndDequantizeV4::Attrs::round_mode_ = "HALF_TO_EVEN"
bool tensorflow::ops::QuantizeAndDequantizeV4::Attrs::signed_input_ = true
Public functions
Axis
TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::Axis(
int64 x
)
If specified, this axis is treated as a channel or slice axis, and a separate quantization range is used for each channel or slice along this axis.
Defaults to -1
NarrowRange
TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::NarrowRange(
bool x
)
If True, then the absolute value of the quantized minimum value is the same as the quantized maximum value, instead of 1 greater.
i.e. for 8 bit quantization, the minimum value is -127 instead of -128.
Defaults to false
NumBits
TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::NumBits(
int64 x
)
The bitwidth of the quantization.
Defaults to 8
RangeGiven
TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::RangeGiven(
bool x
)
Whether the range is given or should be determined from the input
tensor.
Defaults to false
RoundMode
TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::RoundMode(
StringPiece x
)
The 'round_mode' attribute controls which rounding tie-breaking algorithm is used when rounding float values to their quantized equivalents.
The following rounding modes are currently supported:
- HALF_TO_EVEN: this is the default round_mode.
- HALF_UP: round towards positive. In this mode 7.5 rounds up to 8 and -7.5 rounds up to -7.
Defaults to "HALF_TO_EVEN"
TF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::SignedInput(
bool x
)
Whether the quantization is signed or unsigned.
(actually this parameter should have been called
signed_output
)
Defaults to true
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-11-15 UTC.
[null,null,["Last updated 2021-11-15 UTC."],[],[],null,["# tensorflow::ops::QuantizeAndDequantizeV4::Attrs Struct Reference\n\ntensorflow::ops::QuantizeAndDequantizeV4::Attrs\n===============================================\n\n`#include \u003carray_ops.h\u003e`\n\nOptional attribute setters for [QuantizeAndDequantizeV4](/api_docs/cc/class/tensorflow/ops/quantize-and-dequantize-v4#classtensorflow_1_1ops_1_1_quantize_and_dequantize_v4).\n\nSummary\n-------\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------------------------------------|---------------|\n| [axis_](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1aed4f0690b8d5c0d0a6944a1befee89cb)` = -1` | `int64` |\n| [narrow_range_](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1ac5f2d8839cbcb62a73fa09463d89dcbd)` = false` | `bool` |\n| [num_bits_](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1a1a89736832fb7a8b845dd3888a83f638)` = 8` | `int64` |\n| [range_given_](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1ae1b775a9105bb3894a6cd7c98bdd0b75)` = false` | `bool` |\n| [round_mode_](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1ae49e97bbf558b7ff2467e23622cd713a)` = \"HALF_TO_EVEN\"` | `StringPiece` |\n| [signed_input_](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1aa78cd1c5ab78b90114ef9aebe7488ea1)` = true` | `bool` |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Axis](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1a05346052e4983b6fc85ea4bc11c9e697)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/quantize-and-dequantize-v4/attrs#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs) If specified, this axis is treated as a channel or slice axis, and a separate quantization range is used for each channel or slice along this axis. |\n| [NarrowRange](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1aabdd6eed5b5efb96d92fd1744a0a2d55)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/quantize-and-dequantize-v4/attrs#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs) If True, then the absolute value of the quantized minimum value is the same as the quantized maximum value, instead of 1 greater. |\n| [NumBits](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1ac75f54dc51bc31498c0dd5849d544095)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/quantize-and-dequantize-v4/attrs#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs) The bitwidth of the quantization. |\n| [RangeGiven](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1aad7aaf17fdc8b303d889a10f048aaeb3)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/quantize-and-dequantize-v4/attrs#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs) Whether the range is given or should be determined from the `input` tensor. |\n| [RoundMode](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1aa95ef25cc4ce4076b3cabebb016d690a)`(StringPiece x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/quantize-and-dequantize-v4/attrs#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs) The 'round_mode' attribute controls which rounding tie-breaking algorithm is used when rounding float values to their quantized equivalents. |\n| [SignedInput](#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs_1abef99d1c39bb4513f049554ab334f9b2)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/quantize-and-dequantize-v4/attrs#structtensorflow_1_1ops_1_1_quantize_and_dequantize_v4_1_1_attrs) Whether the quantization is signed or unsigned. |\n\nPublic attributes\n-----------------\n\n### axis_\n\n```scdoc\nint64 tensorflow::ops::QuantizeAndDequantizeV4::Attrs::axis_ = -1\n``` \n\n### narrow_range_\n\n```scdoc\nbool tensorflow::ops::QuantizeAndDequantizeV4::Attrs::narrow_range_ = false\n``` \n\n### num_bits_\n\n```scdoc\nint64 tensorflow::ops::QuantizeAndDequantizeV4::Attrs::num_bits_ = 8\n``` \n\n### range_given_\n\n```scdoc\nbool tensorflow::ops::QuantizeAndDequantizeV4::Attrs::range_given_ = false\n``` \n\n### round_mode_\n\n```scdoc\nStringPiece tensorflow::ops::QuantizeAndDequantizeV4::Attrs::round_mode_ = \"HALF_TO_EVEN\"\n``` \n\n### signed_input_\n\n```scdoc\nbool tensorflow::ops::QuantizeAndDequantizeV4::Attrs::signed_input_ = true\n``` \n\nPublic functions\n----------------\n\n### Axis\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::Axis(\n int64 x\n)\n``` \nIf specified, this axis is treated as a channel or slice axis, and a separate quantization range is used for each channel or slice along this axis.\n\nDefaults to -1 \n\n### NarrowRange\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::NarrowRange(\n bool x\n)\n``` \nIf True, then the absolute value of the quantized minimum value is the same as the quantized maximum value, instead of 1 greater.\n\ni.e. for 8 bit quantization, the minimum value is -127 instead of -128.\n\nDefaults to false \n\n### NumBits\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::NumBits(\n int64 x\n)\n``` \nThe bitwidth of the quantization.\n\nDefaults to 8 \n\n### RangeGiven\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::RangeGiven(\n bool x\n)\n``` \nWhether the range is given or should be determined from the `input` tensor.\n\nDefaults to false \n\n### RoundMode\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::RoundMode(\n StringPiece x\n)\n``` \nThe 'round_mode' attribute controls which rounding tie-breaking algorithm is used when rounding float values to their quantized equivalents.\n\nThe following rounding modes are currently supported:\n\n\n- HALF_TO_EVEN: this is the default round_mode.\n- HALF_UP: round towards positive. In this mode 7.5 rounds up to 8 and -7.5 rounds up to -7.\n\n\u003cbr /\u003e\n\nDefaults to \"HALF_TO_EVEN\" \n\n### SignedInput\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::QuantizeAndDequantizeV4::Attrs::SignedInput(\n bool x\n)\n``` \nWhether the quantization is signed or unsigned.\n\n(actually this parameter should have been called **`signed_output`**)\n\nDefaults to true"]]