torchliter.exception
Exceptions used by the Engine
class.
BreakIteration
BreakIteration Exception.
Parameters
———- shutdown_engine : bool If flag variable shutdown_engine
(the default is False) is True
, the Engine
object will kill both the interation and the epochs
Attributes ———- shutdown_engine
BreakIteration.__init__
__init__(shutdown_engine: bool = False)
ContinueIteration
ContinueIteration Exception.
When raised, the Engine
iteration will continue.
BadBatchError
BadBatchError Exception, subclass of ContinueIteration.
If current batch of data is corrupted, skip current batch and fetch a new batch and then continue.
StopEngine
StopEngine Exception, subclass of BreakIteration.
When raised at batch iteration level, if shutdown_engine=True
then reraise BreakIteration to terminate engine.
StopEngine.__init__
__init__()
GradientExplosionError
GradientExplosionError, subclass of StopEngine.
GradientExplosionError.__init__
__init__()
FoundNanError
FoundNanError, subclass of StopEngine.
FoundNanError.__init__
__init__()
EarlyStopping
EarlyStopping, subclass of StopEngine.
EarlyStopping.__init__
__init__()