CancelEpochException
struct
defined in module
FluxTraining
CancelEpochException(message)
Throw during fitting to cancel the currently running epoch.
This prematurely ends the current epoch without throwing an error.
Must be thrown inside the context of
runepoch
.
runepoch
(
learner
,
phase
)
do
_
for
batch
in
batches
step!
(
learner
,
phase
,
batch
)
if
learner
.
step
.
loss
<
1.
throw
(
CancelEpochException
(
"
Reached target loss
"
)
)
end
end
end
There are
2
methods for CancelEpochException
:
CancelEpochException(msg::String)
CancelEpochException(msg)
The following pages link back here: