


from typing import Optional, Union

import torch
from torch import nn

from ...configuration_utils import ConfigMixin, register_to_config
from ...models.modeling_utils import ModelMixin





class   SCREAMING_SNAKE_CASE_			(a__						,       a__						):




       '''simple docstring'''



       @register_to_config
       def __init__(						self				:				Any		,				__a				:				int = 768		,				)					->Tuple:
          super().__init__()

          lowerCamelCase_						:   str		= nn.Parameter(torch.zeros(1		,				__a							)							)
          lowerCamelCase_						:   int		= nn.Parameter(torch.ones(1		,				__a							)							)



       def 				_lowerCAmelCase							(						self				:				int		,				__a				:				Optional[Union[str, torch.device]] = None		,				__a				:				Optional[torch.dtype] = None		,				)					->Optional[int]:
          lowerCamelCase_						:   List[Any]		= nn.Parameter(self.mean.to(__a							).to(__a							)							)
          lowerCamelCase_						:   Optional[int]		= nn.Parameter(self.std.to(__a							).to(__a							)							)
          return self



       def 				_lowerCAmelCase							(						self				:				List[Any]		,				__a				:				Tuple							)					->Union[str, Any]:
          lowerCamelCase_						:   Dict		= (embeds - self.mean) * 1.0 / self.std
          return embeds




       def 				_lowerCAmelCase							(						self				:				List[str]		,				__a				:				Dict							)					->List[Any]:
          lowerCamelCase_						:   Any		= (embeds * self.std) + self.mean
          return embeds









def    __lowerCamelCase   (      A__						: int						,						A__						: int					)     ->    int:
   return int((input_a, input_a).count(0					) == 0					)


def    __lowerCamelCase   (      )     ->    None:
   assert and_gate(0						,						0					) == 0
   assert and_gate(0						,						1					) == 0
   assert and_gate(1						,						0					) == 0
   assert and_gate(1						,						1					) == 1


if __name__ == "__main__":
      test_and_gate()
      print(and_gate(1, 0))
      print(and_gate(0, 0))
      print(and_gate(0, 1))
      print(and_gate(1, 1))





