Errors
- 원본 링크 : https://keras.io/api/keras_tuner/errors/
- 최종 확인 : 2024-11-25
FailedTrialError class
keras_tuner.errors.FailedTrialError()Raise this error to mark a Trial as failed.
When this error is raised in a Trial, the Tuner would not retry the
Trial but directly mark it as "FAILED".
Example
class MyHyperModel(keras_tuner.HyperModel):
def build(self, hp):
# Build the model
...
if too_slow(model):
# Mark the Trial as "FAILED" if the model is too slow.
raise keras_tuner.FailedTrialError("Model is too slow.")
return modelFatalError class
keras_tuner.errors.FatalError()A fatal error during search to terminate the program.
It is used to terminate the KerasTuner program for errors that need
users immediate attention. When this error is raised in a Trial, it will
not be caught by KerasTuner.
FatalValueError class
keras_tuner.errors.FatalValueError()A fatal error during search to terminate the program.
It is a subclass of FatalError and ValueError.
It is used to terminate the KerasTuner program for errors that need
users immediate attention. When this error is raised in a Trial, it will
not be caught by KerasTuner.
FatalTypeError class
keras_tuner.errors.FatalTypeError()A fatal error during search to terminate the program.
It is a subclass of FatalError and TypeError.
It is used to terminate the KerasTuner program for errors that need
users immediate attention. When this error is raised in a Trial, it will
not be caught by KerasTuner.
FatalRuntimeError class
keras_tuner.errors.FatalRuntimeError()A fatal error during search to terminate the program.
It is a subclass of FatalError and RuntimeError.
It is used to terminate the KerasTuner program for errors that need
users immediate attention. When this error is raised in a Trial, it will
not be caught by KerasTuner.