
from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


_A     =  {
    "susnato/ernie-m-base_pytorch": "https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json",
    "susnato/ernie-m-large_pytorch": "https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json",
}





class 			_lowerCAmelCase      (			__a ):
				_lowercase    	='''ernie_m'''
				_lowercase    	={'''dropout''': '''classifier_dropout''', '''num_classes''': '''num_labels'''}




				def __init__(      self       ,       _UpperCamelCase = 250_002       ,       _UpperCamelCase = 768       ,       _UpperCamelCase = 12       ,       _UpperCamelCase = 12       ,       _UpperCamelCase = 3_072       ,       _UpperCamelCase = "gelu"       ,       _UpperCamelCase = 0.1       ,       _UpperCamelCase = 0.1       ,       _UpperCamelCase = 514       ,       _UpperCamelCase = 0.02       ,       _UpperCamelCase = 1       ,       _UpperCamelCase = 1e-0_5       ,       _UpperCamelCase=None       ,       _UpperCamelCase=False       ,       _UpperCamelCase=0.0       ,       **_UpperCamelCase       ,       )       ->   Union[str, Any]:
							super().__init__(pad_token_id=_UpperCamelCase       ,       **_UpperCamelCase  )
							lowerCAmelCase_      			=			vocab_size
							lowerCAmelCase_      			=			hidden_size
							lowerCAmelCase_      			=			num_hidden_layers
							lowerCAmelCase_      			=			num_attention_heads
							lowerCAmelCase_      			=			intermediate_size
							lowerCAmelCase_      			=			hidden_act
							lowerCAmelCase_      			=			hidden_dropout_prob
							lowerCAmelCase_      			=			attention_probs_dropout_prob
							lowerCAmelCase_      			=			max_position_embeddings
							lowerCAmelCase_      			=			initializer_range
							lowerCAmelCase_      			=			layer_norm_eps
							lowerCAmelCase_      			=			classifier_dropout
							lowerCAmelCase_      			=			is_decoder
							lowerCAmelCase_      			=			act_dropout





def      lowerCamelCase__       (       __lowerCAmelCase						:						list[list[int]]					,							__lowerCAmelCase						:						int					,							__lowerCAmelCase						:						int					,							__lowerCAmelCase						:						set       ):




			"""simple docstring"""


			lowerCAmelCase_			,						lowerCAmelCase_      			=			len(__lowerCAmelCase       ), len(grid[0]       )
			if (
			    min(__lowerCAmelCase					,							__lowerCAmelCase       ) < 0
			    or row == row_length
			    or col == col_length
			    or (row, col) in visit
			    or grid[row][col] == 1
			):
						return 0
			if row == row_length - 1 and col == col_length - 1:
						return 1

			visit.add((row, col)       )

			lowerCAmelCase_      			=			0
			count += depth_first_search(__lowerCAmelCase					,							row + 1					,							__lowerCAmelCase					,							__lowerCAmelCase       )
			count += depth_first_search(__lowerCAmelCase					,							row - 1					,							__lowerCAmelCase					,							__lowerCAmelCase       )
			count += depth_first_search(__lowerCAmelCase					,							__lowerCAmelCase					,							col + 1					,							__lowerCAmelCase       )
			count += depth_first_search(__lowerCAmelCase					,							__lowerCAmelCase					,							col - 1					,							__lowerCAmelCase       )

			visit.remove((row, col)       )
			return count


if __name__ == "__main__":
			import doctest

			doctest.testmod()



