

def   a   (    A__			:     int   ,     A__			:     int  )					->   Tuple:





      """simple docstring"""



      if a < 0 or b < 0:
            raise ValueError('the value of both inputs must be positive'  )

      _lowercase			 =str(bin(lowerCamelCase_  )  )[2:]  # remove the leading "0b"
      _lowercase			 =str(bin(lowerCamelCase_  )  )[2:]  # remove the leading "0b"

      _lowercase			 =max(len(lowerCamelCase_  )   ,     len(lowerCamelCase_  )  )

      return "0b" + "".join(
          str(int(char_a == '1' and char_b == '1'  )  )
          for char_a, char_b in zip(a_binary.zfill(lowerCamelCase_  )   ,     b_binary.zfill(lowerCamelCase_  )  )  )


if __name__ == "__main__":
 import doctest

 doctest.testmod()





import math

import tensorflow as tf
from packaging import version
def   a   (    A__			:     Tuple  )					->   List[Any]:





      """simple docstring"""



      _lowercase			 =tf.convert_to_tensor(A__  )
      _lowercase			 =0.5 * (1.0 + tf.math.erf(x / tf.cast(tf.sqrt(2.0  )   ,     x.dtype  )  ))

      return x * cdf
def   a   (    A__			:     Any  )					->   int:





      """simple docstring"""



      _lowercase			 =tf.convert_to_tensor(A__  )
      _lowercase			 =tf.cast(math.pi   ,     x.dtype  )
      _lowercase			 =tf.cast(0.044715   ,     x.dtype  )
      _lowercase			 =0.5 * (1.0 + tf.tanh(tf.sqrt(2.0 / pi  ) * (x + coeff * tf.pow(A__   ,     3  ))  ))

      return x * cdf
def   a   (    A__			:     Optional[int]  )					->   int:





      """simple docstring"""



      _lowercase			 =tf.convert_to_tensor(A__  )

      return x * tf.tanh(tf.math.softplus(A__  )  )
def   a   (    A__			:     Tuple  )					->   List[str]:





      """simple docstring"""



      _lowercase			 =tf.convert_to_tensor(A__  )
      _lowercase			 =tf.cast(0.044715   ,     x.dtype  )
      _lowercase			 =tf.cast(0.7978845608   ,     x.dtype  )

      return 0.5 * x * (1.0 + tf.tanh(x * coeffa * (1.0 + coeffa * x * x)  ))
def   a   (    A__			:     int  )					->   Any:





      """simple docstring"""



      _lowercase			 =tf.convert_to_tensor(A__  )
      _lowercase			 =tf.cast(1.702   ,     x.dtype  )
      return x * tf.math.sigmoid(coeff * x  )
def   a   (    A__			:     int  )					->   Dict:





      """simple docstring"""



      return tf.clip_by_value(_gelu(A__  )   ,     -10   ,     10  )
def   a   (    A__			:     Optional[int]   ,     A__			:     int=-1  )					->   Optional[Any]:





      """simple docstring"""



      _lowercase , _lowercase			 =tf.split(A__   ,     2   ,     axis=A__  )
      return a * tf.math.sigmoid(A__  )


if version.parse(tf.version.VERSION) >= version.parse('2.4'):
  def   a   (    A__			:     Any  )					->   Dict:





        """simple docstring"""



        return tf.keras.activations.gelu(A__   ,     approximate=A__  )

  lowercase_             =     tf.keras.activations.gelu







  lowercase_             =     approximate_gelu_wrap
else:
  lowercase_             =     _gelu
  lowercase_             =     _gelu_new


lowercase_             =     {
    'gelu': gelu,
    'gelu_10': gelu_aa,
    'gelu_fast': gelu_fast,
    'gelu_new': gelu_new,
    'glu': glu,
    'mish': mish,
    'quick_gelu': quick_gelu,
    'relu': tf.keras.activations.relu,
    'sigmoid': tf.keras.activations.sigmoid,
    'silu': tf.keras.activations.swish,
    'swish': tf.keras.activations.swish,
    'tanh': tf.keras.activations.tanh,
}







def   a   (    A__			:     Optional[int]  )					->   str:





      """simple docstring"""



      if activation_string in ACTaFN:
            return ACTaFN[activation_string]
      else:
            raise KeyError(F'''function {activation_string} not found in ACT2FN mapping {list(ACTaFN.keys()  )}'''  )


