New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalize gradient check for multiple weight matrices #818
Conversation
@prlz77, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Randl, @nyanp and @edgarriba to be potential reviewers. |
tiny_dnn/network.h
Outdated
|
||
if (w.empty()) continue; | ||
if ((*weights[0]).empty()) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (weights.empty() || (*weights[0]).empty()) continue;
is preferred in case of current->weights()
returns empty vector.
You need to run clang-format |
tiny_dnn/network.h
Outdated
|
||
if (w.empty()) continue; | ||
if (weights.empty() || (*weights[0]).empty()) continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nyanp what would make that weights is not empty but yes first indexed element ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edgarriba
Ah probably if (weights.empty())
is enough in this case. Checking emptiness of each elements can be performed in calc_delta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I change it then? I can do it in just a moment but I think it is correct both ways.
@prlz77 use clang-format so that we can merge |
Problems with training? Looks strange |
@Randl It seems a precission problem, I think this can be solved just by training for more iterations. |
1 similar comment
@edgarriba this is complementary to #846, so it is still necessary. |
* Generalize gradient check for multiple weight matrices * Add nyanp fix * clang-format
No description provided.