Browse code

1D: add self.n like in the Learner2D

Bas Nijholt authored on 08/12/2017 16:10:39
Showing 1 changed files
... ...
@@ -99,6 +99,10 @@ class Learner1D(BaseLearner):
99 99
     def data_combined(self):
100 100
         return {**self.data, **self.data_interp}
101 101
 
102
+    @property
103
+    def n(self):
104
+        return len(self.data)
105
+
102 106
     def loss(self, real=True):
103 107
         losses = self.losses if real else self.losses_combined
104 108
         if len(losses) == 0: