neural_network.simple_neural_network

Forward propagation explanation: https://towardsdatascience.com/forward-propagation-in-neural-networks-simplified-math-and-code-version-bbcfef6f9250

Attributes

INITIAL_VALUE

expected

Functions

forward_propagation(→ float)

Return the value found after the forward propagation training.

sigmoid_function(→ float)

Return the sigmoid function of a float.

Module Contents

neural_network.simple_neural_network.forward_propagation(expected: int, number_propagations: int) float

Return the value found after the forward propagation training.

>>> res = forward_propagation(32, 450_000)  # Was 10_000_000
>>> res > 31 and res < 33
True
>>> res = forward_propagation(32, 1000)
>>> res > 31 and res < 33
False
neural_network.simple_neural_network.sigmoid_function(value: float, deriv: bool = False) float

Return the sigmoid function of a float.

>>> sigmoid_function(3.5)
0.9706877692486436
>>> sigmoid_function(3.5, True)
-8.75
neural_network.simple_neural_network.INITIAL_VALUE = 0.02
neural_network.simple_neural_network.expected