4.3.3 Softplus
Last updated
Last updated
#include <stdio.h>
#include <math.h>
double softplus(double x) {
return log(1 + exp(x));
}
int main() {
double x = 0.5;
double y = softplus(x);
printf("The softplus of %f is %f\n", x, y);
return 0;
}The softplus of 0.500000 is 0.648721