diff --git a/neural_network/simple_neural_network.py b/neural_network/simple_neural_network.py index 9fc085ab2b0f..fcc661fc6f88 100644 --- a/neural_network/simple_neural_network.py +++ b/neural_network/simple_neural_network.py @@ -21,15 +21,12 @@ def sigmoid_function(value: float, deriv: bool = False) -> float: return 1 / (1 + math.exp(-value)) +def elementwise_multiply(value, array): + return [value * x for x in array] + # Initial Value INITIAL_VALUE = 0.02 - -def forward_propagation(expected, number_propagations): - # Random weight initialization - weight = 2 * (random.random() - 0.5) - - def forward_propagation(expected: int, number_propagations: int) -> float: """Return the value found after the forward propagation training.