jacobian

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit f8fd68053bde09d3c129f7587de9bc055e522ae8
parent 24810ffa46552c6a5853147122b3bfb0f68012fd
Author: David Freifeld <freifeld.david@gmail.com>
Date:   Sun, 21 Jun 2020 20:09:52 -0700

Fixed training, no clue why it helped

Diffstat:
Mbpnn.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bpnn.cpp b/bpnn.cpp @@ -152,7 +152,7 @@ void Network::backpropagate() // std::cout << "\nROUND\n\n\n\n\n\n"; std::vector<Eigen::MatrixXd> gradients; std::vector<Eigen::MatrixXd> deltas; - Eigen::MatrixXd error = ((*layers[length-1].contents) - (*labels)).cwiseProduct(((*layers[length-1].contents) - (*labels))); + Eigen::MatrixXd error = ((*layers[length-1].contents) - (*labels));//.cwiseProduct(((*layers[length-1].contents) - (*labels))); gradients.push_back(error.cwiseProduct(*layers[length-1].dZ)); deltas.push_back((*layers[length-2].contents).transpose() * gradients[0]); int counter = 1;