Skip to content
Snippets Groups Projects
Commit c2e5ad85 authored by David Vojtek's avatar David Vojtek
Browse files

Fix: fix of Gradiant descent

parent 9fe185ff
No related branches found
No related tags found
No related merge requests found
...@@ -56,10 +56,10 @@ namespace lib4neuro { ...@@ -56,10 +56,10 @@ namespace lib4neuro {
void MSE::calculate_error_gradient(std::vector<double> &params, std::vector<double> &grad, double alpha, size_t batch) { void MSE::calculate_error_gradient(std::vector<double> &params, std::vector<double> &grad, double alpha, size_t batch) {
size_t dim_out = this->ds->get_output_dim(); size_t dim_out = this->ds->get_output_dim();
size_t n_elements = this->ds->get_n_elements();
std::vector<std::pair<std::vector<double>, std::vector<double>>> data = this->ds->get_random_data_batch(batch); std::vector<std::pair<std::vector<double>, std::vector<double>>> data = this->ds->get_random_data_batch(batch);
size_t n_elements = data.size();
std::vector<double> error_derivative(dim_out); std::vector<double> error_derivative(dim_out);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment