





"""simple docstring"""




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 		__A							(				SCREAMING_SNAKE_CASE_					,			SCREAMING_SNAKE_CASE_	):






     @register_to_config
     def __init__(	self       ,  a__ = 768       ,  ):
       super().__init__()

       _lowerCAmelCase		: Optional[int]						    =  nn.Parameter(torch.zeros(1       ,  a__						)						)
       _lowerCAmelCase		: Optional[Any]						    =  nn.Parameter(torch.ones(1       ,  a__						)						)






     def 					__A						(	self       ,  a__ = None       ,  a__ = None       ,  ):
       _lowerCAmelCase		: Any						    =  nn.Parameter(self.mean.to(a__						).to(a__						)						)
       _lowerCAmelCase		: Any						    =  nn.Parameter(self.std.to(a__						).to(a__						)						)
       return self






     def 					__A						(	self       ,  a__						):
       _lowerCAmelCase		: Union[str, Any]						    =  (embeds - self.mean) * 1.0 / self.std
       return embeds






     def 					__A						(	self       ,  a__						):
       _lowerCAmelCase		: Tuple						    =  (embeds * self.std) + self.mean
       return embeds





"""simple docstring"""




_a   :	Optional[Any] 					=     '\n# Transformers installation\n! pip install transformers datasets\n# To install from source instead of the last release, comment the command above and uncomment the following one.\n# ! pip install git+https://github.com/huggingface/transformers.git\n'

_a   :	List[str] 					=     [{'type': 'code', 'content': INSTALL_CONTENT}]
_a   :	str 					=     {
    '{processor_class}': 'FakeProcessorClass',
    '{model_class}': 'FakeModelClass',
    '{object_class}': 'FakeObjectClass',
}




