'''simple docstring'''




import math
import random




def 							lowerCamelCase			(   UpperCAmelCase__ :      float   ,   UpperCAmelCase__ :      bool = False				)    ->   float:
							if deriv:
														return value * (1 - value)
							return 1 / (1 + math.exp(-value				))


# Initial Value
_lowercase		:				List[Any]	       =		0.0_2




def 							lowerCamelCase			(   UpperCAmelCase__ :      int   ,   UpperCAmelCase__ :      int				)    ->   float:
							lowercase_      :    List[Any]       		= float(2 * (random.randint(1   ,   100				)) - 1				)

							for _ in range(UpperCAmelCase__				):
														# Forward propagation
														lowercase_      :    int       		= sigmoid_function(INITIAL_VALUE * weight				)
														# How much did we miss?
														lowercase_      :    List[Any]       		= (expected / 100) - layer_a
														# Error delta
														lowercase_      :    Optional[int]       		= layer_1_error * sigmoid_function(UpperCAmelCase__   ,   UpperCAmelCase__				)
														# Update weight
														weight += INITIAL_VALUE * layer_1_delta

							return layer_a * 100


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						_lowercase		:				int	       =		int(input("Expected value: "))
						_lowercase		:				Any	       =		int(input("Number of propagations: "))
						print(forward_propagation(expected, number_propagations))






'''simple docstring'''




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_lowercase		:				Dict	       =		{
    "configuration_bloom": ["BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP", "BloomConfig", "BloomOnnxConfig"],
}
try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase		:				Dict	       =		["BloomTokenizerFast"]

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowercase		:				Dict	       =		[
						    "BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "BloomForCausalLM",
						    "BloomModel",
						    "BloomPreTrainedModel",
						    "BloomForSequenceClassification",
						    "BloomForTokenClassification",
						    "BloomForQuestionAnswering",
						]

if TYPE_CHECKING:
						from .configuration_bloom import BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP, BloomConfig, BloomOnnxConfig

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_bloom_fast import BloomTokenizerFast

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_bloom import (
												    BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST,
												    BloomForCausalLM,
												    BloomForQuestionAnswering,
												    BloomForSequenceClassification,
												    BloomForTokenClassification,
												    BloomModel,
												    BloomPreTrainedModel,
												)

else:
						import sys

						_lowercase		:				Optional[int]	       =		_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





