





'''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      snake_case     (    __lowerCamelCase			,       __lowerCamelCase       ):




 """simple docstring"""



 @register_to_config
 def __init__(       self       :							Any							,	__A       :							int = 7_6_8							,	):
        super().__init__()

        __UpperCamelCase       =  nn.Parameter(torch.zeros(1							,	__A	)	)
        __UpperCamelCase       =  nn.Parameter(torch.ones(1							,	__A	)	)






 def        _lowerCamelCase					(       self       :							Optional[Any]							,	__A       :							Optional[Union[str, torch.device]] = None							,	__A       :							Optional[torch.dtype] = None							,	):
        __UpperCamelCase       =  nn.Parameter(self.mean.to(__A	).to(__A	)	)
        __UpperCamelCase       =  nn.Parameter(self.std.to(__A	).to(__A	)	)
        return self






 def        _lowerCamelCase					(       self       :							Optional[int]							,	__A       :							Optional[int]	):
        __UpperCamelCase       =  (embeds - self.mean) * 1.0 / self.std
        return embeds






 def        _lowerCamelCase					(       self       :							Optional[int]							,	__A       :							Tuple	):
        __UpperCamelCase       =  (embeds * self.std) + self.mean
        return embeds





'''simple docstring'''





def 						__snake_case(				_lowerCAmelCase     ,   _lowerCAmelCase     ,   _lowerCAmelCase		)		-> float:
      snake_case__  :    str    						=      (num_of_terms / 2) * (2 * first_term + (num_of_terms - 1) * common_diff)
      # formula for sum of series
      return total





def 						__snake_case(				)		-> List[str]:
      print(sum_of_series(1     ,   1     ,   10		)		)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
