


import os
import sys

import transformers


_snake_case             =     '''3'''

print('''Python version:''', sys.version)
print('''transformers version:''', transformers.__version__)

try:
   import torch

   print('''Torch version:''', torch.__version__)
   print('''Cuda available:''', torch.cuda.is_available())
   print('''Cuda version:''', torch.version.cuda)
   print('''CuDNN version:''', torch.backends.cudnn.version())
   print('''Number of GPUs available:''', torch.cuda.device_count())
   print('''NCCL version:''', torch.cuda.nccl.version())
except ImportError:
   print('''Torch version:''', None)

try:
   import deepspeed

   print('''DeepSpeed version:''', deepspeed.__version__)
except ImportError:
   print('''DeepSpeed version:''', None)

try:
   import tensorflow as tf

   print('''TensorFlow version:''', tf.__version__)
   print('''TF GPUs available:''', bool(tf.config.list_physical_devices('''GPU''')))
   print('''Number of TF GPUs available:''', len(tf.config.list_physical_devices('''GPU''')))
except ImportError:
   print('''TensorFlow version:''', None)







"""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))
