Skip to content

nancheckcallback

nancheckcallback

Module for keras callback to check Nan

Classes

LossNanCheckCallback

LossNanCheckCallback(check_logs=None)

Bases: Callback

Callback to check if nan is in loss

Source code in niceml/dlframeworks/keras/callbacks/nancheckcallback.py
def __init__(self, check_logs: Optional[List[str]] = None):
    super().__init__()
    self.check_logs = check_logs or ["loss", "val_loss"]

NanInLossError

Bases: Exception

Error when loss is NaN