import tensorflow as tf


    def get_config(self):
        return {
            "initial_learning_rate": self.initial_learning_rate,
            "maximal_learning_rate": self.maximal_learning_rate,
            "step_size": self.step_size,
            "scale_mode": self.scale_mode,
        }


@tf.keras.utils.register_keras_serializable(package="Addons")
class TriangularCyclicalLearningRate(CyclicalLearningRate):
    def __init__(
        self,
        initial_learning_rate,
        maximal_learning_rate,
        step_size,
        scale_mode="cycle",
        name="TriangularCyclicalLearningRate",
    ):
