Skip to content

Commit baf0cb5

Browse files
authored
Merge pull request #1 from Manoj-Routhu/Manoj-Routhu-patch-2
Update simple_neural_network.py
2 parents 1d6b28f + 57c3276 commit baf0cb5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

neural_network/simple_neural_network.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ def sigmoid_function(value: float, deriv: bool = False) -> float:
2121
return 1 / (1 + math.exp(-value))
2222

2323

24+
def elementwise_multiply(value, array):
25+
return [value * x for x in array]
26+
2427
# Initial Value
2528
INITIAL_VALUE = 0.02
2629

27-
28-
def forward_propagation(expected, number_propagations):
29-
# Random weight initialization
30-
weight = 2 * (random.random() - 0.5)
31-
32-
3330
def forward_propagation(expected: int, number_propagations: int) -> float:
3431
"""Return the value found after the forward propagation training.
3532

0 commit comments

Comments
 (0)