13 lines
No EOL
205 B
C
13 lines
No EOL
205 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <math.h>
|
|
|
|
float sigmoid(float weighted_sum)
|
|
{
|
|
return 1.0 / (1 + exp(-(float)weighted_sum));
|
|
}
|
|
|
|
float sigmoid_derivative(float output)
|
|
{
|
|
return 1.0;
|
|
} |