Skip to content

Commit

Permalink
chore: add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasfremming committed Nov 3, 2024
1 parent f1288c0 commit a79f5a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/NEATnetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ def __init__(self, genome: Genome):
self.topological_order = self._topological_sort()

def sigmoid(self, x: np.ndarray) -> np.ndarray:
""" Sigmoid activation function.
Args:
x (np.ndarray): Input array
Returns:
np.ndarray: Output array after applying sigmoid function
"""
return 1 / (1 + np.exp(-x))

def ReLU(self, x):
Expand Down

0 comments on commit a79f5a4

Please sign in to comment.