fix logit funciton error

This commit is contained in:
SmartAI 2022-02-18 10:58:52 +08:00 committed by GitHub
parent aac9bd6479
commit cc6e00d091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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){
@ -881,4 +881,4 @@ namespace MLPP{
}
return a;
}
}
}