


"""simple docstring"""







from typing import TYPE_CHECKING

from ..utils import _LazyModule


a__				:							List[str]						=     {
    '''config''': [
        '''EXTERNAL_DATA_FORMAT_SIZE_LIMIT''',
        '''OnnxConfig''',
        '''OnnxConfigWithPast''',
        '''OnnxSeq2SeqConfigWithPast''',
        '''PatchingSpec''',
    ],
    '''convert''': ['''export''', '''validate_model_outputs'''],
    '''features''': ['''FeaturesManager'''],
    '''utils''': ['''ParameterFormat''', '''compute_serialized_parameters_size'''],
}


if TYPE_CHECKING:
		from .config import (
		    EXTERNAL_DATA_FORMAT_SIZE_LIMIT,
		    OnnxConfig,
		    OnnxConfigWithPast,
		    OnnxSeqaSeqConfigWithPast,
		    PatchingSpec,
		)
		from .convert import export, validate_model_outputs
		from .features import FeaturesManager
		from .utils import ParameterFormat, compute_serialized_parameters_size

else:
		import sys

		a__				:							List[Any]						=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




"""simple docstring"""







import math
import random




def    UpperCAmelCase__       (lowerCAmelCase_  ,						lowerCAmelCase_ = False   ):




					'''simple docstring'''


					if deriv:
										return value * (1 - value)
					return 1 / (1 + math.exp(-value   ))


# Initial Value
a__				:							Tuple						=     0.02




def    UpperCAmelCase__       (lowerCAmelCase_  ,						lowerCAmelCase_   ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE						   =				float(2 * (random.randint(1  ,						100   )) - 1   )

					for _ in range(lowerCAmelCase_   ):
										# Forward propagation
										__SCREAMING_SNAKE_CASE						   =				sigmoid_function(INITIAL_VALUE * weight   )
										# How much did we miss?
										__SCREAMING_SNAKE_CASE						   =				(expected / 100) - layer_a
										# Error delta
										__SCREAMING_SNAKE_CASE						   =				layer_1_error * sigmoid_function(lowerCAmelCase_  ,						lowerCAmelCase_   )
										# Update weight
										weight += INITIAL_VALUE * layer_1_delta

					return layer_a * 100


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		a__				:							List[str]						=     int(input('''Expected value: '''))
		a__				:							str						=     int(input('''Number of propagations: '''))
		print(forward_propagation(expected, number_propagations))
