Skip to content

Commit dbbedef

Browse files
committed
modified: neural_network/artificial_neural_network.py
1 parent d23fe85 commit dbbedef

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

neural_network/artificial_neural_network.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ class ANN:
66
Simple Artificial Neural Network (ANN)
77
88
- Feedforward Neural Network with 1 hidden layer and Sigmoid activation.
9-
- Uses Gradient Descent for backpropagation and Mean Squared Error (MSE) as the loss function.
9+
- Uses Gradient Descent for backpropagation and Mean Squared Error (MSE)
10+
as the loss function.
1011
- Example demonstrates solving the XOR problem.
1112
"""
1213

@@ -57,7 +58,8 @@ def sigmoid_derivative(self, sigmoid_output: np.ndarray) -> np.ndarray:
5758
Derivative of the sigmoid function.
5859
5960
Args:
60-
sigmoid_output (ndarray): Output after applying the sigmoid function.
61+
sigmoid_output (ndarray): Output after applying
62+
the sigmoid function.
6163
6264
Returns:
6365
ndarray: Derivative of the sigmoid function.
@@ -71,6 +73,7 @@ def sigmoid_derivative(self, sigmoid_output: np.ndarray) -> np.ndarray:
7173
return sigmoid_output * (1 - sigmoid_output)
7274

7375
def feedforward(self, inputs: np.ndarray) -> np.ndarray:
76+
7477
"""
7578
Perform forward propagation through the network.
7679

0 commit comments

Comments
 (0)