def add_clamped_relu(self, name, input_name, output_name, alpha=0.0, beta=6.0):
        """
        Add a clamped relu layer to the model.
        Clamped relu formula is f(x) = min((x >= 0 ? x : alpha * x), beta)
        Refer to the ``ClampedReluLayerParams`` message in the specification (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_name: str
            The input blob name of this layer.
        output_name: str
            The output blob name of this layer.
        alpha: float, optional
             slope of the output when input is negative, default: 0.0.
        beta: float, optional
            Upper bound on the output value, default: 6.0.

        See Also
        --------
        add_clip
        """

        if self.spec and (
            not self.spec.specificationVersion
            or self.spec.specificationVersion < _SPECIFICATION_VERSION_IOS_14
        ):
            self.spec.specificationVersion = _SPECIFICATION_VERSION_IOS_14

        spec_layer = self._add_generic_layer(name, [input_name], [output_name])
        spec_layer.clampedReLU.MergeFromString(b"")
        spec_params = spec_layer.clampedReLU

        spec_params.alpha = float(alpha)
        spec_params.beta = float(beta)

        return spec_layer

        Add a clamped relu layer to the model.
        Clamped relu formula is f(x) = min((x >= 0 ? x : alpha * x), beta)
        Refer to the ``ClampedReluLayerParams`` message in the specification (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_name: str
            The input blob name of this layer.
        output_name: str
            The output blob name of this layer.
        alpha: float, optional
             slope of the output when input is negative, default: 0.0.
        beta: float, optional
            Upper bound on the output value, default: 6.0.

        See Also
        --------
        add_clip
        
coremltools/models/neural_network/builder.py