def clone_for_refitting(
        self,
    ) -> "KerasClassifier":
        """
        Create a copy of the classifier that can be refit from scratch. Will inherit same architecture, optimizer and
        initialization as cloned model, but without weights.

        :return: new classifier
        """
        cloned_classifier = super().clone_for_refitting()
        if isinstance(cloned_classifier, KerasClassifier):
            return cloned_classifier
        raise ValueError("Type of cloned classifier not expected.")

        Create a copy of the classifier that can be refit from scratch. Will inherit same architecture, optimizer and
        initialization as cloned model, but without weights.

        :return: new classifier
        
art/estimators/classification/keras.py