


'''simple docstring'''
from collections import OrderedDict
from typing import List, 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/efficientnet-b7''': '''https://huggingface.co/google/efficientnet-b7/resolve/main/config.json''',
}




class 			lowerCamelCase_   (	__a      ):
      lowerCAmelCase__		     =     'efficientnet'






      def __init__(					self				:    Union[str, Any]						,						_A				:    int = 3						,						_A				:    int = 600						,						_A				:    float = 2.0						,						_A				:    float = 3.1						,						_A				:    int = 8						,						_A				:    List[int] = [3, 3, 5, 3, 5, 5, 3]						,						_A				:    List[int] = [32, 16, 24, 40, 80, 112, 192]						,						_A				:    List[int] = [16, 24, 40, 80, 112, 192, 320]						,						_A				:    List[int] = []						,						_A				:    List[int] = [1, 2, 2, 2, 1, 2, 1]						,						_A				:    List[int] = [1, 2, 2, 3, 3, 4, 1]						,						_A				:    List[int] = [1, 6, 6, 6, 6, 6, 6]						,						_A				:    float = 0.2_5						,						_A				:    str = "swish"						,						_A				:    int = 2_560						,						_A				:    str = "mean"						,						_A				:    float = 0.0_2						,						_A				:    float = 0.0_0_1						,						_A				:    float = 0.9_9						,						_A				:    float = 0.5						,						_A				:    float = 0.2						,						**_A				:    Union[str, Any]						,						):


          '''simple docstring'''


          super().__init__(**_A )

          UpperCAmelCase__			:		Optional[int]													=				num_channels
          UpperCAmelCase__			:		Dict													=				image_size
          UpperCAmelCase__			:		List[str]													=				width_coefficient
          UpperCAmelCase__			:		str													=				depth_coefficient
          UpperCAmelCase__			:		str													=				depth_divisor
          UpperCAmelCase__			:		List[Any]													=				kernel_sizes
          UpperCAmelCase__			:		Optional[Any]													=				in_channels
          UpperCAmelCase__			:		Optional[Any]													=				out_channels
          UpperCAmelCase__			:		Optional[Any]													=				depthwise_padding
          UpperCAmelCase__			:		Tuple													=				strides
          UpperCAmelCase__			:		Tuple													=				num_block_repeats
          UpperCAmelCase__			:		Dict													=				expand_ratios
          UpperCAmelCase__			:		Optional[Any]													=				squeeze_expansion_ratio
          UpperCAmelCase__			:		List[Any]													=				hidden_act
          UpperCAmelCase__			:		Any													=				hidden_dim
          UpperCAmelCase__			:		int													=				pooling_type
          UpperCAmelCase__			:		Dict													=				initializer_range
          UpperCAmelCase__			:		Tuple													=				batch_norm_eps
          UpperCAmelCase__			:		Optional[Any]													=				batch_norm_momentum
          UpperCAmelCase__			:		List[str]													=				dropout_rate
          UpperCAmelCase__			:		Optional[Any]													=				drop_connect_rate
          UpperCAmelCase__			:		Dict													=				sum(_A ) * 4




class 			lowerCamelCase_   (	__a      ):
      lowerCAmelCase__		     =     version.parse('1.11'      )






      @property
      def lowercase_							(					self				:    Any ):


          '''simple docstring'''


          return OrderedDict(
              [
                  ('''pixel_values''', {0: '''batch''', 1: '''num_channels''', 2: '''height''', 3: '''width'''}),
              ] )






      @property
      def lowercase_							(					self				:    Union[str, Any] ):


          '''simple docstring'''


          return 1e-5




'''simple docstring'''
import re

from filelock import FileLock


try:
  import nltk

  UpperCamelCase__    					=      True
except (ImportError, ModuleNotFoundError):
  UpperCamelCase__    					=      False

if NLTK_AVAILABLE:
  with FileLock('''.lock''') as lock:
    nltk.download('''punkt''', quiet=True)





def 					a__       (					lowerCAmelCase__						)    ->	str:
    re.sub('''<n>'''  ,					''''''  ,					lowerCAmelCase__						)  # remove pegasus newline char
    assert NLTK_AVAILABLE, "nltk must be installed to separate newlines between sentences. (pip install nltk)"
    return "\n".join(nltk.sent_tokenize(lowerCAmelCase__						)						)
