From 1f459ba19422593de325983040e176f97cf4ffc0 Mon Sep 17 00:00:00 2001 From: aktersnurra Date: Thu, 20 Aug 2020 22:18:35 +0200 Subject: A lot of stuff working :D. ResNet implemented! --- src/training/util.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/training/util.py (limited to 'src/training/util.py') diff --git a/src/training/util.py b/src/training/util.py deleted file mode 100644 index 132b2dc..0000000 --- a/src/training/util.py +++ /dev/null @@ -1,19 +0,0 @@ -"""Utility functions for training neural networks.""" - - -class RunningAverage: - """Maintains a running average.""" - - def __init__(self) -> None: - """Initializes the parameters.""" - self.steps = 0 - self.total = 0 - - def update(self, val: float) -> None: - """Updates the parameters.""" - self.total += val - self.steps += 1 - - def __call__(self) -> float: - """Computes the running average.""" - return self.total / float(self.steps) -- cgit v1.2.3-70-g09d2