| 128 | } |
| 129 | |
| 130 | array ann::predict(const array &input) { |
| 131 | vector<array> signal = forward_propagate(input); |
| 132 | array out = signal[num_layers - 1]; |
| 133 | return out; |
| 134 | } |
| 135 | |
| 136 | double ann::train(const array &input, const array &target, double alpha, |
| 137 | int max_epochs, int batch_size, double maxerr, bool verbose) { |