(&self, acc: &mut Vec<Matrix<f64>>, deltas: &Vec<Vec<f64>>, a: &Vec<Vec<f64>>)
| 180 | } |
| 181 | |
| 182 | fn update(&self, acc: &mut Vec<Matrix<f64>>, deltas: &Vec<Vec<f64>>, a: &Vec<Vec<f64>>) { |
| 183 | |
| 184 | let mut dp = deltas.len(); |
| 185 | for i in (0..acc.len()) { |
| 186 | dp -= 1; |
| 187 | acc[i].iadd(&deltas[dp].col_mul_row(&a[i])); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | pub fn derivatives(&self, examples: &Matrix<f64>, targets: &Matrix<f64>) -> Vec<Matrix<f64>> { |
| 192 |