mirror of
https://github.com/augustin64/projet-tipe
synced 2025-04-23 13:33:54 +02:00
Fix Sigmoid
This commit is contained in:
parent
29f694d04d
commit
48a95b10db
@ -21,12 +21,12 @@ float max(float a, float b){
|
|||||||
}
|
}
|
||||||
|
|
||||||
float sigmoid(float x){
|
float sigmoid(float x){
|
||||||
return 1/(1 + exp(x));
|
return 1/(1 - exp(-x));
|
||||||
}
|
}
|
||||||
|
|
||||||
float sigmoid_derivee(float x){
|
float sigmoid_derivee(float x){
|
||||||
float tmp = sigmoid(x);
|
float tmp = exp(-x);
|
||||||
return tmp*(1-tmp);
|
return tmp/((1+tmp)*(1+tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
float leaky_ReLU(float x){
|
float leaky_ReLU(float x){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user