The WiML Symposium 2023 returns December 7! Join the livestream at 9:30 AM PST
Register
QuantizeOp
Stay organized with collections
Save and categorize content based on your preferences.
Quantizes a TensorBuffer
with given zeroPoint
and scale
.
Note: QuantizeOp
does not cast output to UINT8, but only performs the quantization
math on top of input. The data type of output tensor is always FLOAT32
except that the Op
is effectively an identity Op (in this case, the output tensor is the same instance as the
input). To connect with quantized model, a CastOp
is probably needed.
If both zeroPoint
and scale
are 0, the QuantizeOp
will be bypassed,
which is equivalent to setting zeroPoint
to 0 and scale
to 1. This can be useful
when passing in the quantization parameters that are extracted directly from the TFLite model
flatbuffer. If the tensor is not quantized, both zeroPoint
and scale
will be read
as 0.
Inherited Methods
From class
java.lang.Object
boolean
|
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
Public Constructors
public
QuantizeOp
(float zeroPoint, float scale)
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.
Last updated 2021-09-24 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]