





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:	Optional[int] = logging.get_logger(__name__)

__UpperCamelCase:	Dict = {
    """google/vit-base-patch16-224""": """https://huggingface.co/vit-base-patch16-224/resolve/main/config.json""",
    # See all ViT models at https://huggingface.co/models?filter=vit
}


class       __lowerCAmelCase					(       _UpperCamelCase      ):


	'''simple docstring'''





	_A													=				"vit"

	def __init__(						self:						Tuple,					lowerCamelCase_:						Any=768,					lowerCamelCase_:						Optional[int]=12,					lowerCamelCase_:						Union[str, Any]=12,					lowerCamelCase_:						int=3072,					lowerCamelCase_:						Optional[int]="gelu",					lowerCamelCase_:						Optional[Any]=0.0,					lowerCamelCase_:						str=0.0,					lowerCamelCase_:						str=0.0_2,					lowerCamelCase_:						Union[str, Any]=1E-12,					lowerCamelCase_:						Optional[Any]=224,					lowerCamelCase_:						List[Any]=16,					lowerCamelCase_:						str=3,					lowerCamelCase_:						Optional[Any]=True,					lowerCamelCase_:						Dict=16,					**lowerCamelCase_:						Any,					):
			super().__init__(**lowerCamelCase_			)

			lowercase__					:      int      =		hidden_size
			lowercase__					:      List[Any]      =		num_hidden_layers
			lowercase__					:      List[str]      =		num_attention_heads
			lowercase__					:      int      =		intermediate_size
			lowercase__					:      Union[str, Any]      =		hidden_act
			lowercase__					:      Tuple      =		hidden_dropout_prob
			lowercase__					:      Any      =		attention_probs_dropout_prob
			lowercase__					:      Optional[Any]      =		initializer_range
			lowercase__					:      Optional[Any]      =		layer_norm_eps
			lowercase__					:      Optional[int]      =		image_size
			lowercase__					:      Tuple      =		patch_size
			lowercase__					:      Optional[int]      =		num_channels
			lowercase__					:      List[str]      =		qkv_bias
			lowercase__					:      Optional[int]      =		encoder_stride


class       __lowerCAmelCase					(       _UpperCamelCase      ):


	'''simple docstring'''





	_A													=				version.parse("1.11"      )

	@property
	def    snake_case__(						self:						str			):
			return OrderedDict(
			    [
			        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
			    ]			)





	@property
	def    snake_case__(						self:						Tuple			):
			return 1E-4









from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available


@dataclass
class       __lowerCAmelCase					(       _UpperCamelCase      ):


	'''simple docstring'''





	_A													=				42
	_A													=				42


if is_transformers_available() and is_torch_available():
			from .pipeline_semantic_stable_diffusion import SemanticStableDiffusionPipeline


