View source on GitHub |
Register customize optimizer cls.
tfm.optimization.register_optimizer_cls(
key: str,
optimizer_config_cls: Union[tf.keras.optimizers.Optimizer, tf.keras.optimizers.legacy.Optimizer,
tf.keras.optimizers.experimental.Optimizer],
use_legacy_optimizer: bool = True
)
The user will still need to subclass data classes in configs.optimization_config to be used with OptimizerFactory.