tf.raw_ops.UniformQuantizedClipByValue
Stay organized with collections
Save and categorize content based on your preferences.
Perform clip by value on the quantized Tensor operand
.
tf.raw_ops.UniformQuantizedClipByValue(
operand,
min,
max,
scales,
zero_points,
quantization_min_val,
quantization_max_val,
quantization_axis=-1,
name=None
)
Given quantized operand
which was quantized using scales
and zero_points
, performs clip by value using min
and max
values.
If quantization_axis is -1 (per-tensor quantized), the entire operand is clipped using scalar min, max.
Otherwise (per-channel quantized), the clipping is also done per-channel.
Args |
operand
|
A Tensor . Must be one of the following types: qint32 .
Must be a Tensor of T.
|
min
|
A Tensor . Must have the same type as operand .
The min value(s) to clip operand. Must be a Tensor of T.
Must be a scalar Tensor if quantization_axis is -1 (per-tensor quantization), otherwise 1D Tensor of size (operand.dim_size(quantization_axis),) (per-axis quantization).
|
max
|
A Tensor . Must have the same type as operand .
The min value(s) to clip operand. Must be a Tensor of T.
Must be a scalar Tensor if quantization_axis is -1 (per-tensor quantization), otherwise 1D Tensor of size (operand.dim_size(quantization_axis),) (per-axis quantization).
|
scales
|
A Tensor of type float32 .
The float value(s) used as scale(s) when quantizing operand , min and max .
Must be a scalar Tensor if quantization_axis is -1 (per-tensor quantization), otherwise 1D Tensor of size (operand.dim_size(quantization_axis),) (per-axis quantization).
|
zero_points
|
A Tensor of type int32 .
The int32 value(s) used as zero_point(s) when quantizing operand , min and max .
Same shape condition as scales.
|
quantization_min_val
|
An int .
The quantization min value that was used when operand was quantized.
|
quantization_max_val
|
An int .
The quantization max value that was used when operand was quantized.
|
quantization_axis
|
An optional int . Defaults to -1 .
Indicates the dimension index of the tensor where per-axis quantization is applied for the slices along that dimension.
If set to -1 (default), this indicates per-tensor quantization. Otherwise, it must be set within range [0, operand.dims()).
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor . Has the same type as operand .
|
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 2023-03-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-03-27 UTC."],[],[]]