Update Documentation

Clean up project
This commit is contained in:
Alexander Engelsberger
2021-05-21 15:42:45 +02:00
parent a5e086ce0d
commit 7b4f7d84e0
11 changed files with 146 additions and 126 deletions

View File

@@ -1,14 +0,0 @@
"""Callbacks for Pytorch Lighning Modules"""
import pytorch_lightning as pl
import torch
class StopOnNaN(pl.Callback):
def __init__(self, param):
super().__init__()
self.param = param
def on_epoch_end(self, trainer, pl_module, logs={}):
if torch.isnan(self.param).any():
raise ValueError("NaN encountered. Stopping.")