



'''simple docstring'''





import warnings

from ...utils import logging
from .image_processing_videomae import VideoMAEImageProcessor


SCREAMING_SNAKE_CASE__          =  logging.get_logger(__name__)


class 					snake_case			(UpperCamelCase ):



       def __init__(					self  ,*UpperCAmelCase_  ,**UpperCAmelCase_   )	->				None:
           warnings.warn(
               "The class VideoMAEFeatureExtractor is deprecated and will be removed in version 5 of Transformers."
               " Please use VideoMAEImageProcessor instead."  ,UpperCAmelCase_  ,)
           super().__init__(*UpperCAmelCase_  ,**UpperCAmelCase_   )









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



       @register_to_config
       def __init__(					self  ,UpperCAmelCase_ = 768  ,)	->				List[Any]:
           super().__init__()

           lowercase__									=    nn.Parameter(torch.zeros(1  ,UpperCAmelCase_   )   )
           lowercase__									=    nn.Parameter(torch.ones(1  ,UpperCAmelCase_   )   )



       def 				_a   (					self  ,UpperCAmelCase_ = None  ,UpperCAmelCase_ = None  ,)	->				Any:
           lowercase__									=    nn.Parameter(self.mean.to(UpperCAmelCase_   ).to(UpperCAmelCase_   )   )
           lowercase__									=    nn.Parameter(self.std.to(UpperCAmelCase_   ).to(UpperCAmelCase_   )   )
           return self



       def 				_a   (					self  ,UpperCAmelCase_   )	->				Tuple:
           lowercase__									=    (embeds - self.mean) * 1.0 / self.std
           return embeds







       def 				_a   (					self  ,UpperCAmelCase_   )	->				List[str]:
           lowercase__									=    (embeds * self.std) + self.mean
           return embeds




