- added train

- refactored CdTrain
This commit is contained in:
2025-12-16 15:58:06 +01:00
parent 944b96448c
commit a3894f7c34
5 changed files with 120 additions and 62 deletions
+9
View File
@@ -14,3 +14,12 @@ def sample(src: np.ndarray) -> np.ndarray:
def prob(src: np.ndarray) -> np.ndarray:
return 1.0 / (1 + np.exp(-src))
def rms_error(d_err: np.ndarray):
d_err_squared = d_err % d_err
return np.sum(d_err_squared, 1) / d_err_squared[1]
def rms_error_accu(d_err: np.ndarray):
d_err_squared = d_err % d_err
return np.cumsum(d_err_squared) / d_err_squared[1]