Skip to content

Commit

Permalink
Merge pull request #10 from SmartAI/main
Browse files Browse the repository at this point in the history
fix logit funciton error
  • Loading branch information
novak-99 committed Feb 18, 2022
2 parents aac9bd6 + cc6e00d commit d2ab86f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MLPP/Activation/Activation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ namespace MLPP{

double Activation::logit(double z, bool deriv){
if(deriv) { return 1/z - 1/(z-1); }
return std::log(z / (1 + z));
return std::log(z / (1 - z));
}

std::vector<double> Activation::logit(std::vector<double> z, bool deriv){
Expand Down Expand Up @@ -881,4 +881,4 @@ namespace MLPP{
}
return a;
}
}
}

0 comments on commit d2ab86f

Please sign in to comment.