




'''simple docstring'''



from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase_							:	Dict	     =		logging.get_logger(__name__)

UpperCAmelCase_							:	List[str]	     =		{
    '''microsoft/cvt-13''': '''https://huggingface.co/microsoft/cvt-13/resolve/main/config.json''',
    # See all Cvt models at https://huggingface.co/models?filter=cvt
}





class      lowerCAmelCase (			__lowerCAmelCase):
       __lowercase	:   int										=      '''cvt'''


       def __init__( self     ,	__SCREAMING_SNAKE_CASE=3     ,	__SCREAMING_SNAKE_CASE=[7, 3, 3]     ,	__SCREAMING_SNAKE_CASE=[4, 2, 2]     ,	__SCREAMING_SNAKE_CASE=[2, 1, 1]     ,	__SCREAMING_SNAKE_CASE=[64, 192, 384]     ,	__SCREAMING_SNAKE_CASE=[1, 3, 6]     ,	__SCREAMING_SNAKE_CASE=[1, 2, 10]     ,	__SCREAMING_SNAKE_CASE=[4.0, 4.0, 4.0]     ,	__SCREAMING_SNAKE_CASE=[0.0, 0.0, 0.0]     ,	__SCREAMING_SNAKE_CASE=[0.0, 0.0, 0.0]     ,	__SCREAMING_SNAKE_CASE=[0.0, 0.0, 0.1]     ,	__SCREAMING_SNAKE_CASE=[True, True, True]     ,	__SCREAMING_SNAKE_CASE=[False, False, True]     ,	__SCREAMING_SNAKE_CASE=["dw_bn", "dw_bn", "dw_bn"]     ,	__SCREAMING_SNAKE_CASE=[3, 3, 3]     ,	__SCREAMING_SNAKE_CASE=[1, 1, 1]     ,	__SCREAMING_SNAKE_CASE=[2, 2, 2]     ,	__SCREAMING_SNAKE_CASE=[1, 1, 1]     ,	__SCREAMING_SNAKE_CASE=[1, 1, 1]     ,	__SCREAMING_SNAKE_CASE=0.02     ,	__SCREAMING_SNAKE_CASE=1E-12     ,	**__SCREAMING_SNAKE_CASE     ,	)   ->	int:



            '''simple docstring'''




            super().__init__(**__SCREAMING_SNAKE_CASE	)
            __snake_case            =	num_channels
            __snake_case            =	patch_sizes
            __snake_case            =	patch_stride
            __snake_case            =	patch_padding
            __snake_case            =	embed_dim
            __snake_case            =	num_heads
            __snake_case            =	depth
            __snake_case            =	mlp_ratio
            __snake_case            =	attention_drop_rate
            __snake_case            =	drop_rate
            __snake_case            =	drop_path_rate
            __snake_case            =	qkv_bias
            __snake_case            =	cls_token
            __snake_case            =	qkv_projection_method
            __snake_case            =	kernel_qkv
            __snake_case            =	padding_kv
            __snake_case            =	stride_kv
            __snake_case            =	padding_q
            __snake_case            =	stride_q
            __snake_case            =	initializer_range
            __snake_case            =	layer_norm_eps












'''simple docstring'''



from typing import Optional

import pyspark

from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader





class      lowerCAmelCase (			__lowerCAmelCase):


       def __init__( self     ,	__SCREAMING_SNAKE_CASE     ,	__SCREAMING_SNAKE_CASE = None     ,	__SCREAMING_SNAKE_CASE = None     ,	__SCREAMING_SNAKE_CASE = True     ,	__SCREAMING_SNAKE_CASE = None     ,	__SCREAMING_SNAKE_CASE = False     ,	__SCREAMING_SNAKE_CASE = None     ,	__SCREAMING_SNAKE_CASE = True     ,	__SCREAMING_SNAKE_CASE = "arrow"     ,	**__SCREAMING_SNAKE_CASE     ,	)   ->	Union[str, Any]:



            '''simple docstring'''




            super().__init__(
                split=__SCREAMING_SNAKE_CASE     ,	features=__SCREAMING_SNAKE_CASE     ,	cache_dir=__SCREAMING_SNAKE_CASE     ,	keep_in_memory=__SCREAMING_SNAKE_CASE     ,	streaming=__SCREAMING_SNAKE_CASE     ,	**__SCREAMING_SNAKE_CASE     ,	)
            __snake_case            =	load_from_cache_file
            __snake_case            =	file_format
            __snake_case            =	Spark(
                df=__SCREAMING_SNAKE_CASE     ,	features=__SCREAMING_SNAKE_CASE     ,	cache_dir=__SCREAMING_SNAKE_CASE     ,	working_dir=__SCREAMING_SNAKE_CASE     ,	**__SCREAMING_SNAKE_CASE     ,	)




       def    lowerCAmelCase   ( self	)   ->	str:



            '''simple docstring'''




            if self.streaming:
                 return self.builder.as_streaming_dataset(split=self.split	)
            __snake_case            =	None if self._load_from_cache_file else DownloadMode.FORCE_REDOWNLOAD
            self.builder.download_and_prepare(
                download_mode=__SCREAMING_SNAKE_CASE     ,	file_format=self._file_format     ,	)
            return self.builder.as_dataset(split=self.split	)






