mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Fix Sigmoid
This commit is contained in:
parent
29f694d04d
commit
48a95b10db
@ -17,16 +17,16 @@
|
|||||||
|
|
||||||
|
|
||||||
float max(float a, float b){
|
float max(float a, float b){
|
||||||
return a<b?b:a;
|
return a < b ? b : a;
|
||||||
}
|
}
|
||||||
|
|
||||||
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…
Reference in New Issue
Block a user