


'''simple docstring'''
from ....configuration_utils import PretrainedConfig
from ....utils import logging


UpperCAmelCase_ :     List[str]								=      logging.get_logger(__name__)

UpperCAmelCase_ :     Tuple								=      {
    'Visual-Attention-Network/van-base': (
        'https://huggingface.co/Visual-Attention-Network/van-base/blob/main/config.json'
    ),
}

class 						_lowerCamelCase					(    _UpperCamelCase				):




	'''simple docstring'''
	__lowercase				:		Tuple    							=						'''van'''


	def __init__(      self      ,      __lowercase=224      ,      __lowercase=3      ,      __lowercase=[7, 3, 3, 3]      ,      __lowercase=[4, 2, 2, 2]      ,      __lowercase=[64, 128, 320, 512]      ,      __lowercase=[3, 3, 12, 3]      ,      __lowercase=[8, 8, 4, 4]      ,      __lowercase="gelu"      ,      __lowercase=0.0_2      ,      __lowercase=1E-6      ,      __lowercase=1E-2      ,      __lowercase=0.0      ,      __lowercase=0.0      ,      **__lowercase      ,      ):

		"""simple docstring"""







		super().__init__(**__lowercase						)
		__A  :		str       =			image_size
		__A  :		Optional[Any]       =			num_channels
		__A  :		str       =			patch_sizes
		__A  :		Optional[Any]       =			strides
		__A  :		Optional[Any]       =			hidden_sizes
		__A  :		Union[str, Any]       =			depths
		__A  :		Tuple       =			mlp_ratios
		__A  :		str       =			hidden_act
		__A  :		int       =			initializer_range
		__A  :		Tuple       =			layer_norm_eps
		__A  :		Union[str, Any]       =			layer_scale_init_value
		__A  :		Tuple       =			drop_path_rate
		__A  :		Any       =			dropout_rate










'''simple docstring'''
import unittest

from transformers import DonutProcessor


UpperCAmelCase_ :     str								=      'naver-clova-ix/donut-base'

class 						_lowerCamelCase					(    unittest.TestCase				):




 '''simple docstring'''


 def  snake_case__   (      self						):

  """simple docstring"""







  __A  :		List[str]       =			DonutProcessor.from_pretrained(__lowercase						)







 def  snake_case__   (      self						):

  """simple docstring"""







  __A  :		List[str]       =			{
      'name': 'John Doe',
      'age': '99',
      'city': 'Atlanta',
      'state': 'GA',
      'zip': '30301',
      'phone': '123-4567',
      'nicknames': [{'nickname': 'Johnny'}, {'nickname': 'JD'}],
  }

  __A  :		Optional[Any]       =			(
      '<s_name>John Doe</s_name><s_age>99</s_age><s_city>Atlanta</s_city>'
      '<s_state>GA</s_state><s_zip>30301</s_zip><s_phone>123-4567</s_phone>'
      '<s_nicknames><s_nickname>Johnny</s_nickname>'
      '<sep/><s_nickname>JD</s_nickname></s_nicknames>'
  )
  __A  :		List[Any]       =			self.processor.tokenajson(__lowercase						)

  self.assertDictEqual(__lowercase      ,      __lowercase						)






