TorchLiter

module torchliter.exception

Exceptions used by the Engine class.


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

method BreakIteration.__init__

__init__(shutdown_engine: bool = False)

class ContinueIteration

ContinueIteration Exception.

When raised, the Engine iteration will continue.


class BadBatchError

BadBatchError Exception, subclass of ContinueIteration.

If current batch of data is corrupted, skip current batch and fetch a new batch and then continue.


class StopEngine

StopEngine Exception, subclass of BreakIteration.

When raised at batch iteration level, if shutdown_engine=True then reraise BreakIteration to terminate engine.

method StopEngine.__init__

__init__()

class GradientExplosionError

GradientExplosionError, subclass of StopEngine.

method GradientExplosionError.__init__

__init__()

class FoundNanError

FoundNanError, subclass of StopEngine.

method FoundNanError.__init__

__init__()

class EarlyStopping

EarlyStopping, subclass of StopEngine.

method EarlyStopping.__init__

__init__()