FailedTrialError
classkeras_tuner.errors.FailedTrialError()
Raise this error to mark a Trial
as invalid.
When this error is raised, the Tuner
would not retry the Trial
but
directly mark it as "INVALID"
.
Example
class MyHyperModel(keras_tuner.HyperModel):
def build(self, hp):
# Build the model
...
if too_slow(model):
# Mark the Trial as "INVALID" if the model is too slow.
raise keras_tuner.FailedTrialError("Model is too slow.")
return model
FatalError
classkeras_tuner.errors.FatalError()
Error specially to breakthrough try-except for Tuner.run_trial()
.
This error will raised again after caught by the try-except around
Tuner.run_trial()
. So, it should only be used in subroutines of
Tuner.run_trial()
.
It is used to terminate the KerasTuner program for errors that need users immediate attention.
FatalValueError
classkeras_tuner.errors.FatalValueError()
Error specially to breakthrough try-except for Tuner.run_trial()
.
This error will raised again after caught by the try-except around
Tuner.run_trial()
. So, it should only be used in subroutines of
Tuner.run_trial()
.
It is used to terminate the KerasTuner program for errors that need users immediate attention.
FatalTypeError
classkeras_tuner.errors.FatalTypeError()
Error specially to breakthrough try-except for Tuner.run_trial()
.
This error will raised again after caught by the try-except around
Tuner.run_trial()
. So, it should only be used in subroutines of
Tuner.run_trial()
.
It is used to terminate the KerasTuner program for errors that need users immediate attention.
FatalRuntimeError
classkeras_tuner.errors.FatalRuntimeError()
Error specially to breakthrough try-except for Tuner.run_trial()
.
This error will raised again after caught by the try-except around
Tuner.run_trial()
. So, it should only be used in subroutines of
Tuner.run_trial()
.
It is used to terminate the KerasTuner program for errors that need users immediate attention.