tfmot.quantization.keras.QuantizeRegistry
Stay organized with collections
Save and categorize content based on your preferences.
ABC interface which specifies how layers should be quantized.
The Registry is designed to function as a repository of QuantizeConfig
s
linked to layers. The idea is that while applying quantization to the various
layers within a Keras model, the registry can be used to query which
QuantizeConfig
can be used to quantize a specific layer
. The
QuantizeConfig
itself contains information to quantize that specific
layer.
We provide a default registry for built-in Keras layers, but implementing this
interface allows users the ability to write their own custom registries
specific to their needs. It can also be extended to be used for any Keras
layer, such as custom Keras layers.
Methods
get_quantize_config
View source
@abc.abstractmethod
get_quantize_config(
layer
)
Returns the quantization config for the given layer.
Args |
layer
|
input layer to return quantize config for.
|
Returns |
Returns the QuantizeConfig for the given layer.
|
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 2023-05-26 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"
}]
{"lastModified": "Last updated 2023-05-26 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-05-26 UTC."],[],[]]