


import os
import sys

lowerCAmelCase__  :Optional[Any]             =							os.path.join(os.path.dirname(__file__), '''src''')
sys.path.append(SRC_DIR)


from transformers import (
    AutoConfig,
    AutoModel,
    AutoModelForCausalLM,
    AutoModelForMaskedLM,
    AutoModelForQuestionAnswering,
    AutoModelForSequenceClassification,
    AutoTokenizer,
    add_start_docstrings,
)


lowerCAmelCase__  :Dict             =							[
    '''torch''',
    '''numpy''',
    '''tokenizers''',
    '''filelock''',
    '''requests''',
    '''tqdm''',
    '''regex''',
    '''sentencepiece''',
    '''sacremoses''',
    '''importlib_metadata''',
    '''huggingface_hub''',
]

@add_start_docstrings(AutoConfig.__doc__	)
def 	lowerCAmelCase__			(      *a__:		int      ,  **a__:		List[Any]	)  ->		List[Any]:


							'''simple docstring'''





							return AutoConfig.from_pretrained(*a__      ,  **a__	)

@add_start_docstrings(AutoTokenizer.__doc__	)
def 	lowerCAmelCase__			(      *a__:		List[str]      ,  **a__:		Optional[Any]	)  ->		List[Any]:


							'''simple docstring'''





							return AutoTokenizer.from_pretrained(*a__      ,  **a__	)

@add_start_docstrings(AutoModel.__doc__	)
def 	lowerCAmelCase__			(      *a__:		Tuple      ,  **a__:		Dict	)  ->		Optional[int]:


							'''simple docstring'''





							return AutoModel.from_pretrained(*a__      ,  **a__	)

@add_start_docstrings(AutoModelForCausalLM.__doc__	)
def 	lowerCAmelCase__			(      *a__:		Union[str, Any]      ,  **a__:		List[Any]	)  ->		Union[str, Any]:


							'''simple docstring'''





							return AutoModelForCausalLM.from_pretrained(*a__      ,  **a__	)

@add_start_docstrings(AutoModelForMaskedLM.__doc__	)
def 	lowerCAmelCase__			(      *a__:		Any      ,  **a__:		List[str]	)  ->		Optional[Any]:


							'''simple docstring'''





							return AutoModelForMaskedLM.from_pretrained(*a__      ,  **a__	)

@add_start_docstrings(AutoModelForSequenceClassification.__doc__	)
def 	lowerCAmelCase__			(      *a__:		Dict      ,  **a__:		str	)  ->		int:


							'''simple docstring'''





							return AutoModelForSequenceClassification.from_pretrained(*a__      ,  **a__	)







@add_start_docstrings(AutoModelForQuestionAnswering.__doc__	)
def 	lowerCAmelCase__			(      *a__:		Union[str, Any]      ,  **a__:		List[Any]	)  ->		List[str]:


							'''simple docstring'''





							return AutoModelForQuestionAnswering.from_pretrained(*a__      ,  **a__	)




import math
import random

def 	lowerCAmelCase__			(      a__:		float      ,  a__:		bool = False	)  ->		float:


							'''simple docstring'''





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


# Initial Value
lowerCAmelCase__  :Optional[Any]             =							0.02

def 	lowerCAmelCase__			(      a__:		int      ,  a__:		int	)  ->		float:


							'''simple docstring'''





							_UpperCAmelCase					=      float(2 * (random.randint(1      ,  1_0_0	)) - 1	)

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

							return layer_a * 1_0_0


if __name__ == "__main__":
		import doctest

		doctest.testmod()

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