We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63a113d commit e16d463Copy full SHA for e16d463
tensorflow_model_optimization/python/core/quantization/keras/quantize_config.py
@@ -189,6 +189,18 @@ def get_config(self):
189
"""Returns the config used to serialize `QuantizeConfig`."""
190
raise NotImplementedError('QuantizeConfig should implement get_config().')
191
192
+ @classmethod
193
+ def from_config(cls, config):
194
+ """Instantiates a `QuantizeConfig` from its config.
195
+
196
+ Args:
197
+ config: Output of `get_config()`.
198
199
+ Returns:
200
+ A `QuantizeConfig` instance.
201
+ """
202
+ return cls(**config)
203
204
205
class OutputOnlyConfig(QuantizeConfig):
206
"""QuantizeConfig that only quantizes output."""
0 commit comments