(self, val, n=1)
| 77 | self.count = 0 |
| 78 | |
| 79 | def update(self, val, n=1): |
| 80 | self.val = val |
| 81 | try: |
| 82 | self.max = max(val, self.max) |
| 83 | self.min = min(val, self.min) |
| 84 | except Exception: |
| 85 | pass |
| 86 | self.sum += val * n |
| 87 | self.count += n |
| 88 | self.avg = self.sum / self.count |
| 89 | |
| 90 | |
| 91 | def grad_logger(named_params): |
no outgoing calls
no test coverage detected