Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Matrix/matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,15 @@ void matrix_print_value(T& v, char* comma) {

template <>
void matrix_print_value<int>(int& v, char* comma) {
printf("%0.2d%s ", v, comma);
printf("%d%s ", v, comma);
}
template <>
void matrix_print_value<unsigned int>(unsigned int& v, char* comma) {
printf("%0.2u%s ", v, comma);
printf("%u%s ", v, comma);
}
template <>
void matrix_print_value<long>(long& v, char* comma) {
printf("%0.2l%s ", v, comma);
printf("%ld%s ", v, comma);
}

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion network.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace ml {

template <typename T>
ml::Mat<T> SigGrad(ml::Mat<T> mat) {
return ml::ElementMult(mat, ml::Diff<T>(1, mat));
return ElementMult(mat, Diff(T(1), mat));
}
}

Expand Down