Fix Sigmoid

This commit is contained in:
augustin64 2022-04-21 12:09:35 +02:00
parent 29f694d04d
commit 48a95b10db

View File

@ -21,12 +21,12 @@ float max(float a, float b){
}
float sigmoid(float x){
return 1/(1 + exp(x));
return 1/(1 - exp(-x));
}
float sigmoid_derivee(float x){
float tmp = sigmoid(x);
return tmp*(1-tmp);
float tmp = exp(-x);
return tmp/((1+tmp)*(1+tmp));
}
float leaky_ReLU(float x){