small racing game im working on
Diffstat (limited to 'lib/activation.gd')
| -rw-r--r-- | lib/activation.gd | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/activation.gd b/lib/activation.gd new file mode 100644 index 0000000..1db7637 --- /dev/null +++ b/lib/activation.gd @@ -0,0 +1,9 @@ +class_name Activation + + +static func sigmoid(value: float, _row: int, _col: int) -> float: + return 1 / (1 + exp(-value)) + + +static func dsigmoid(value: float, _row: int, _col: int) -> float: + return value * (1 - value) |