


from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__UpperCamelCase    		=       logging.get_logger(__name__)

__UpperCamelCase    		=       {
    'google/mobilenet_v1_1.0_224': 'https://huggingface.co/google/mobilenet_v1_1.0_224/resolve/main/config.json',
    'google/mobilenet_v1_0.75_192': 'https://huggingface.co/google/mobilenet_v1_0.75_192/resolve/main/config.json',
    # See all MobileNetV1 models at https://huggingface.co/models?filter=mobilenet_v1
}







class        lowerCamelCase__	(							UpperCAmelCase      ):






			"""simple docstring"""






			_UpperCamelCase		:					Union[str, Any]    =		'mobilenet_v1'




			def __init__(							self      ,						snake_case=3      ,						snake_case=224      ,						snake_case=1.0      ,						snake_case=8      ,						snake_case="relu6"      ,						snake_case=True      ,						snake_case=0.999      ,						snake_case=0.02      ,						snake_case=0.001      ,						**snake_case      ,						):

						'''simple docstring'''


						super().__init__(**snake_case     )

						if depth_multiplier <= 0:
									raise ValueError("depth_multiplier must be greater than zero."     )

						UpperCamelCase__					=       num_channels
						UpperCamelCase__					=       image_size
						UpperCamelCase__					=       depth_multiplier
						UpperCamelCase__					=       min_depth
						UpperCamelCase__					=       hidden_act
						UpperCamelCase__					=       tf_padding
						UpperCamelCase__					=       classifier_dropout_prob
						UpperCamelCase__					=       initializer_range
						UpperCamelCase__					=       layer_norm_eps







class        lowerCamelCase__	(							UpperCAmelCase      ):






			"""simple docstring"""






			_UpperCamelCase		:					Union[str, Any]    =		version.parse('1.11'      )




			@property
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						return OrderedDict([("pixel_values", {0: "batch"})]     )




			@property
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						if self.task == "image-classification":
									return OrderedDict([("logits", {0: "batch"})]     )
						else:
									return OrderedDict([("last_hidden_state", {0: "batch"}), ("pooler_output", {0: "batch"})]     )







			@property
			def 				snake_case__				(							self     ):

						'''simple docstring'''


						return 1E-4






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_speech_available,
    is_torch_available,
)


__UpperCamelCase    		=       {
    'configuration_trocr': ['TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TrOCRConfig'],
    'processing_trocr': ['TrOCRProcessor'],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__UpperCamelCase    		=       [
						    'TROCR_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'TrOCRForCausalLM',
						    'TrOCRPreTrainedModel',
						]


if TYPE_CHECKING:
						from .configuration_trocr import TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP, TrOCRConfig
						from .processing_trocr import TrOCRProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_trocr import TROCR_PRETRAINED_MODEL_ARCHIVE_LIST, TrOCRForCausalLM, TrOCRPreTrainedModel

else:
						import sys

						__UpperCamelCase    		=       _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


