a
    Sic                     @   s  d Z ddlm  mZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ dd	lmZ d
Zdddddddddddddddddddddd d!d"d#Zg d$g d%d&d'd(d)g d*g d+d,d'd(d)g d-g d.d/d'd(d)g d0g d1d,d'd(d)g d2g d3d/d'd(d)g d4g d5d6d'd(d)g d7g d8d9d'd(d)g d:g d;d<d'd(d)g d=g d>d?d'd(d)g d@g dAdBd'd(d)g dCg dDdEd'd(d)g dFg dGdHd'd(d)g d$g d%d&d'dId)g dJg dKd&d'dId)g dLg dMd,d'dId)g dNg dOd,d'dId)g dPg dQd/d'dId)g dRg dSd/d'dId)g dTg dUdVd'dId)g dWg dXdYd'dId)g d:g dZd<d'dId)g d@g dAdBd'dId)g d[g d\dBd'dId)g d]g d^d_d'dId)d#Zd`ZddadbZddcddZddedfZddhdiZddkdlZddmdnZd dodpZddrdsZddxdyZedzd{dd}d~ZedddddZedddddZ edddddZ!edddddZ"edddddZ#eddd	ddZ$eddd
ddZ%edddddZ&edddddZ'edddddZ(edddddZ)edddddZ*edddddZ+edddddĄZ,eddƃdddɄZ-edd˃ddd΄Z.eddЃdddӄZ/eddՃddd؄Z0eddڃddd݄Z1edd߃dddZ2edddddZ3edddddZ4edddddZ5ej6d~de_ ej6dde_ ej6dde _ ej6dde!_ ej6dde"_ ej6dde#_ ej6dde$_ ej6dde%_ ej6dde&_ ej6dde'_ ej6dde(_ ej6dde)_ ej6dde*_ ej6dde+_ ej6dde,_ ej6dde-_ ej6dde._ ej6dde/_ ej6dde0_ ej6dde1_ ej6dde2_ ej6dde3_ ej6dde4_ ej6dde5_ eddddZ7eddddZ8e	j8j e8_ dS (  zRegNet models for Keras.

References:

- [Designing Network Design Spaces](https://arxiv.org/abs/2003.13678)
  (CVPR 2020)
- [Fast and Accurate Model Scaling](https://arxiv.org/abs/2103.06877)
  (CVPR 2021)
    N)backend)layers)imagenet_utils)training)
data_utils)layer_utils)keras_exportzDhttps://storage.googleapis.com/tensorflow/keras-applications/regnet/)Z@49fb46e56cde07fdaf57bffd851461a86548f6a3a4baef234dd37290b826c0b8Z@5445b66cd50445eb7ecab094c1e78d4d3d29375439d1a7798861c4af15ffff21)Z@3523c7f5ac0dbbcc2fd6d83b3570e7540f7449d3301cc22c29547302114e4088Z@de139bf07a66c9256f2277bf5c1b6dd2d5a3a891a5f8a925a10c8a0a113fd6f3)Z@340216ef334a7bae30daac9f414e693c136fac9ab868704bbfcc9ce6a5ec74bbZ@a43ec97ad62f86b2a96a783bfdc63a5a54de02eef54f26379ea05e1bf90a9505)Z@8f145d6a5fae6da62677bb8d26eb92d0b9dfe143ec1ebf68b24a57ae50a2763dZ@3c7e4b0917359304dc18e644475c5c1f5e88d795542b676439c4a3acd63b7207)Z@31c386f4c7bfef4c021a583099aa79c1b3928057ba1b7d182f174674c5ef3510Z@1b8e3d545d190271204a7b2165936a227d26b79bb7922bac5ee4d303091bf17a)Z@6c025df1409e5ea846375bc9dfa240956cca87ef57384d93fef7d6fa90ca8c7fZ@9cd4522806c0fcca01b37874188b2bd394d7c419956d77472a4e072b01d99041)Z@ba128046c588a26dbd3b3a011b26cb7fa3cf8f269c184c132372cb20b6eb54c1Z@b4ed0ca0b9a98e789e05000e830403a7ade4d8afa01c73491c44610195198afe)Z@0f4489c3cd3ad979bd6b0324213998bcb36dc861d178f977997ebfe53c3ba564Z@3e706fa416a18dfda14c713423eba8041ae2509db3e0a611d5f599b5268a46c4)Z@76320e43272719df648db37271a247c22eb6e810fe469c37a5db7e2cb696d162Z@7b1ce8e29ceefec10a6569640ee329dba7fbc98b5d0f6346aabade058b66cf29)Z@5cafc461b78897d5e4f24e68cb406d18e75f31105ef620e7682b611bb355eb3aZ@36174ddd0299db04a42631d028abcb1cc7afec2b705e42bd28fcd325e5d596bf)Z@8093f57a5824b181fb734ea21ae34b1f7ee42c5298e63cf6d587c290973195d2Z@9d1485050bdf19531ffa1ed7827c75850e0f2972118a996b91aa9264b088fd43)Z@91fb3e6f4e9e44b3687e80977f7f4412ee9937c0c704232664fc83e4322ea01eZ@9db7eacc37b85c98184070e1a172e6104c00846f44bcd4e727da9e50d9692398)Z@1e8091c674532b1a61c04f6393a9c570113e0197f22bd1b98cc4c4fe800c6465Z@f63221f63d625b8e201221499682587bfe29d33f50a4c4f4d53be00f66c0f12c)Z@752fdbad21c78911bf1dcb8c513e5a0e14697b068e5d9e73525dbaa416d18d8eZ@45e6ba8309a17a77e67afc05228454b2e0ee6be0dae65edc0f31f1da10cc066b)Z@98942e07b273da500ff9699a1f88aca78dfad4375faabb0bab784bb0dace80a9Z@b70261cba4e60013c99d130cc098d2fce629ff978a445663b6fa4f8fc099a2be)Z@1b099377cc9a4fb183159a6f9b24bc998e5659d25a449f40c90cbffcbcfdcae4Z@b11f5432a216ee640fe9be6e32939defa8d08b8d136349bf3690715a98752ca1)Z@b7ce1f5e223f0941c960602de922bcf846288ce7a4c33b2a4f2e4ac4b480045bZ@d7404f50205e82d793e219afb9eb2bfeb781b6b2d316a6128c6d7d7dacab7f57)Z@6a6a545cf3549973554c9b94f0cd40e25f229fffb1e7f7ac779a59dcbee612bdZ@eb3ac1c45ec60f4f031c3f5180573422b1cf7bebc26c004637517372f68f8937)Z@98d00118b335162bbffe8f1329e54e5c8e75ee09b2a5414f97b0ddfc56e796f6Z@b5be2a5e5f072ecdd9c0b8a437cd896df0efa1f6a1f77e41caa8719b7dfcb05d)Z@65c948c7a18aaecaad2d1bd4fd978987425604ba6669ef55a1faa0069a2804b7Z@885c4b7ed7ea339daca7dafa1a62cb7d41b1068897ef90a5a3d71b4a2e2db31a)Z@7a2c62da2982e369a4984d3c7c3b32d6f8d3748a71cb37a31156c436c37f3e95Z@3d119577e1e3bf8d153b895e8ea9e4ec150ff2d92abdca711b6e949c3fd7115d)Z@a96ab0d27d3ae35a422ee7df0d789069b3e3217a99334e0ce861a96595bc5986Z@4a6fa387108380b730b71feea2ad80b5224b5ea9dc21dc156c93fe3c6186485c)Z@45067240ffbc7ca2591313fee2f80dbdda6d66ec1a7451446f9a6d00d8f7ac6eZ@ead1e6b568be8f34447ec8941299a9df4368736ba9a8205de5427fa20a1fb316)Z@b05e173e4ae635cfa22d06392ee3741284d17dadfee68f2aa6fd8cb2b7561112Z@cad78f74a586e24c61d38be17f3ae53bb9674380174d2585da1a526b8c20e1fd)x002x004x006x008x016x032x040x064x080x120x160x320y002y004y006y008y016y032y040y064y080y120y160y320)   r!         )   8      ip        X)depthswidthsgroup_widthdefault_size
block_type)r!      r#      )    @      i     )r!         r#   )0   `      i  r$   )r!   r5   r#   r6   )r2           )r/   r"   
   r/   )H      i  i  )r/         r/   )r8      i  i  r7   )r/   r6      r/   )P   r9   i0  iP  (   )r/   r"   r=   r!   )r?   i  i  iX  r%   )r/   r6   rA   r!   )rD   r9   i  i  x   )r/   r6      r!   )r(       i  p   )r/   r@      r!   )      rI   i   r:   )r/   r#   rK   r!   )P  r<   i@  i	  r?   Y)r!   r5   r@   r@   )r7   h      i  )r!   r5   r#   r"   )r7   rJ   rL   i`  )r!   r5   r'   r/   )r2   r:   i@  i   )r/   r@      r/   )r7   rF   rN   ix  )r/   r6   rK   r!   )r>      @  i  )r/   r@   r0   r/   )r:   rB   rM   i@  r2   )r/   r#   rC   r/   )   r;   rT   i  r>   )r?   rH   rI   i  )r/   r"   rG   r!   )r(   rH   i  i  )r/   r6   r0   r!   )   i  ip  i  rV   a
  Instantiates the {name} architecture.

  Reference:
    - [Designing Network Design Spaces](https://arxiv.org/abs/2003.13678)
    (CVPR 2020)

  For image classification use cases, see
  [this page for detailed examples](
  https://keras.io/api/applications/#usage-examples-for-image-classification-models).

  For transfer learning use cases, make sure to read the
  [guide to transfer learning & fine-tuning](
    https://keras.io/guides/transfer_learning/).

  Note: Each Keras Application expects a specific kind of input preprocessing.
  For Regnets, preprocessing is included in the model using a `Rescaling` layer.
  RegNet models expect their inputs to be float or uint8 tensors of pixels with
  values in the [0-255] range.

  The naming of models is as follows: `RegNet<block_type><flops>` where
  `block_type` is one of `(X, Y)` and `flops` signifies hundred million
  floating point operations. For example RegNetY064 corresponds to RegNet with
  Y block and 6.4 giga flops (64 hundred million flops).

  Args:
    include_top: Whether to include the fully-connected
        layer at the top of the network. Defaults to True.
    weights: One of `None` (random initialization),
          `"imagenet"` (pre-training on ImageNet), or the path to the weights
          file to be loaded. Defaults to `"imagenet"`.
    input_tensor: Optional Keras tensor
        (i.e. output of `layers.Input()`)
        to use as image input for the model.
    input_shape: Optional shape tuple, only to be specified
        if `include_top` is False.
        It should have exactly 3 inputs channels.
    pooling: Optional pooling mode for feature extraction
        when `include_top` is `False`. Defaults to None.
        - `None` means that the output of the model will be
            the 4D tensor output of the
            last convolutional layer.
        - `avg` means that global average pooling
            will be applied to the output of the
            last convolutional layer, and thus
            the output of the model will be a 2D tensor.
        - `max` means that global max pooling will
            be applied.
    classes: Optional number of classes to classify images
        into, only to be specified if `include_top` is True, and
        if no `weights` argument is specified. Defaults to 1000 (number of
        ImageNet classes).
    classifier_activation: A `str` or callable. The activation function to use
        on the "top" layer. Ignored unless `include_top=True`. Set
        `classifier_activation=None` to return the logits of the "top" layer.
        Defaults to `"softmax"`.
        When loading pretrained weights, `classifier_activation` can only
        be `None` or `"softmax"`.

  Returns:
    A `keras.Model` instance.
c                    s*    du rdt td   fdd}|S )zRescales and normalizes inputs to [0,1] and ImageNet mean and std.

    Args:
      name: name prefix

    Returns:
      Rescaled and normalized tensor
    Nprestemc                    s   t jd d d| } | S )Ngp?Z_prestem_rescaling)scalename)r   	RescalingxrY    U/var/www/html/django/DPS/env/lib/python3.9/site-packages/keras/applications/regnet.pyapply  s    zPreStem.<locals>.applystrr   get_uidrY   r`   r^   r]   r_   PreStem~  s    	re   c                    s*    du rdt td   fdd}|S )zImplementation of RegNet stem.

    (Common to all model variants)
    Args:
      name: name prefix

    Returns:
      Output tensor of the Stem
    Nstemc              	      sP   t jdddddd d d| } t jd	d
 d d| } t j d d| } | S )Nr1   r5   r5   r/   Fsame	he_normal
_stem_conv)stridesuse_biaspaddingkernel_initializerrY   ?h㈵>Z_stem_bnmomentumepsilonrY   Z
_stem_relur]   )r   Conv2DBatchNormalizationReLUr[   r]   r^   r_   r`     s$    	
zStem.<locals>.applyra   rd   r^   r]   r_   Stem  s    
rw   c                    s*   du rt td fdd}|S )zImplements the Squeeze and excite block (https://arxiv.org/abs/1709.01507).

    Args:
      filters_in: input filters to the block
      se_filters: filters to squeeze to
      name: name prefix

    Returns:
      A function object
    NZsqueeze_and_excitec                    s`   t jd dd| }t jdddd d|}t j dd	dd
 d|}tj|| }|S )NZ_squeeze_and_excite_gapT)rY   keepdimsr!   r!   reluri   Z_squeeze_and_excite_squeeze)
activationrn   rY   sigmoidZ_squeeze_and_excite_excite)r   GlobalAveragePooling2Drt   tfmathmultiply)inputsr\   
filters_inrY   
se_filtersr^   r_   r`     s2    z$SqueezeAndExciteBlock.<locals>.applyra   )r   r   rY   r`   r^   r   r_   SqueezeAndExciteBlock  s    r   r!   c                    s.   du rt td fdd}|S )aY  Implementation of X Block.

    Reference: [Designing Network Design
    Spaces](https://arxiv.org/abs/2003.13678)
    Args:
      filters_in: filters in the input tensor
      filters_out: filters in the output tensor
      group_width: group width
      stride: stride
      name: name prefix
    Returns:
      Output tensor of the block
    NZxblockc              
      sd   kr2dkr2t d  d d d d	 }dkrztjddd	d
 d| }tjddd d|}n| }tjddd	d d| }tjddd d|}tjd d|}tjdd|dd	d d|}tjddd d|}tjd d|}tjddd	d d|}tjddd d|}tjd d|| }|S Nr!   Input filters() and output filters(z) are not equal for stride 4. Input and output filters must be equal for stride=.ry   Fri   Z	_skip_1x1)rk   rl   rn   rY   ro   rp   Z_skip_bnrq   _conv_1x1_1rl   rn   rY   _conv_1x1_1_bnZ_conv_1x1_1_relur]   rg   rh   	_conv_3x3rl   rk   groupsrm   rn   rY   _conv_3x3_bnZ_conv_3x3_relu_conv_1x1_2_conv_1x1_2_bnZ
_exit_relu)
ValueErrorr   rt   ru   rv   )r   r   skipr\   r   filters_outr,   rY   strider^   r_   r`     s    

	


zXBlock.<locals>.applyra   )r   r   r,   r   rY   r`   r^   r   r_   XBlock  s    Ir         ?c                    s0   du rt td fdd}|S )a  Implementation of Y Block.

    Reference: [Designing Network Design
    Spaces](https://arxiv.org/abs/2003.13678)
    Args:
      filters_in: filters in the input tensor
      filters_out: filters in the output tensor
      group_width: group width
      stride: stride
      squeeze_excite_ratio: expansion ration for Squeeze and Excite block
      name: name prefix
    Returns:
      Output tensor of the block
    NZyblockc              
      s   kr2dkr2t d  d d d d	 }t  }dkrtjddd	d
 d| }tjddd d|}n| }tjddd	d d| }tjddd d|}tjd d|}tjdd|dd	d d|}tjddd d|}tjd d|}t|d|}tjddd	d d|}tjddd d|}tjd d|| }|S r   )r   intr   rt   ru   rv   r   )r   r   r   r   r\   r   r   r,   rY   squeeze_excite_ratior   r^   r_   r`   O  s    

	


zYBlock.<locals>.applyra   )r   r   r,   r   r   rY   r`   r^   r   r_   YBlock6  s    Lr   c                    s2   du rt td fdd}|S )a  Implementation of Z block Reference: [Fast and Accurate Model
    Scaling](https://arxiv.org/abs/2103.06877).

    Args:
      filters_in: filters in the input tensor
      filters_out: filters in the output tensor
      group_width: group width
      stride: stride
      squeeze_excite_ratio: expansion ration for Squeeze and Excite block
      bottleneck_ratio: inverted bottleneck ratio
      name: name prefix
    Returns:
      Output tensor of the block
    NZzblockc              
      s4  kr2dkr2t d d d d d	 }t }t  }tj|ddd	d
 d| }tjddd d|}tj|}tj|dd|dd	d d|}tjddd d|}tj|}t||d}tjddd	d d|}tjddd d|}dkr(|S ||  S d S )Nr!   r   r   z)are not equal for stride r   r   ry   Fri   r   r   ro   rp   r   rq   rg   rh   r   r   r   r]   r   r   )	r   r   r   rt   ru   r~   nnsilur   )r   r   r   Zinv_btlneck_filtersr\   bottleneck_ratior   r   r,   rY   r   r   r^   r_   r`     s|    
	



zZBlock.<locals>.applyra   )r   r   r,   r   r   r   rY   r`   r^   r   r_   ZBlock  s    ?r   c                    s0   du rt td fdd}|S )au  Implementation of Stage in RegNet.

    Args:
      block_type: must be one of "X", "Y", "Z"
      depth: depth of stage, number of blocks to use
      group_width: group width of all blocks in  this stage
      filters_in: input filters to this stage
      filters_out: output filters from this stage
      name: name prefix

    Returns:
      Output tensor of Stage
    Nstagec                    s  | } dkrXt d dd|}tdD ]"}t  d| d|}q2n dkrtdd	 d|}tdD ]"}t d
| d|}qnd dkrtd dd|}tdD ]"}t d| d|}qntd  d|S )Nr)   r/   Z	_XBlock_0)r   rY   r!   Z_XBlock_r]   rO   Z	_YBlock_0Z_YBlock_ZZ	_ZBlock_0Z_ZBlock_zBlock type `z<` not recognized.block_type must be one of (`X`, `Y`, `Z`). )r   ranger   r   NotImplementedError)r   r\   ir.   depthr   r   r,   rY   r^   r_   r`     s|    
zStage.<locals>.applyra   )r.   r   r,   r   r   rY   r`   r^   r   r_   Stage  s    6r     c                    s(    du rt td  fdd}|S )zImplementation of classification head of RegNet.

    Args:
      num_classes: number of classes for Dense layer
      name: name prefix

    Returns:
      Output logits tensor.
    Nheadc                    s.   t j d d| } t j d d| } | S )N	_head_gapr]   Z
head_dense)r   r}   Denser[   rY   num_classesr^   r_   r`   Q  s    zHead.<locals>.applyra   )r   rY   r`   r^   r   r_   HeadD  s    
r   regnetTimagenetsoftmaxc              
   C   s  |dv st jj|std|dkr:|r:|dkr:tdtj|
|dt ||d}
|	du rjt	j
|
d	}nt|	st	j
|	|
d
}n|	}|	durt|	}n|}|}|rt|d|}t|d|}d}tdD ]<}| | }|| }t||||||d t| d|}|}q|r0t|d|}t|| n.|dkrHt	 |}n|dkr^t	 |}tj|||d}|dkr|rd}t|dd  d }nd}t|dd  d }|| }tj|t| d|d}|| n|dur|| |S )a	  Instantiates RegNet architecture given specific configuration.

    Args:
      depths: An iterable containing depths for each individual stages.
      widths: An iterable containing output channel width of each individual
        stages
      group_width: Number of channels to be used in each group. See grouped
        convolutions for more information.
      block_type: Must be one of `{"X", "Y", "Z"}`. For more details see the
        papers "Designing network design spaces" and "Fast and Accurate Model
        Scaling"
      default_size: Default input image size.
      model_name: An optional name for the model.
      include_preprocessing: boolean denoting whther to include preprocessing in
        the model
      include_top: Boolean denoting whether to include classification head to
        the model.
      weights: one of `None` (random initialization), "imagenet" (pre-training
        on ImageNet), or the path to the weights file to be loaded.
      input_tensor: optional Keras tensor (i.e. output of `layers.Input()`) to
        use as image input for the model.
      input_shape: optional shape tuple, only to be specified if `include_top`
        is False. It should have exactly 3 inputs channels.
      pooling: optional pooling mode for feature extraction when `include_top`
        is `False`. - `None` means that the output of the model will be the 4D
        tensor output of the last convolutional layer. - `avg` means that global
        average pooling will be applied to the output of the last convolutional
        layer, and thus the output of the model will be a 2D tensor. - `max`
        means that global max pooling will be applied.
      classes: optional number of classes to classify images into, only to be
        specified if `include_top` is True, and if no `weights` argument is
        specified.
      classifier_activation: A `str` or callable. The activation function to use
        on the "top" layer. Ignored unless `include_top=True`. Set
        `classifier_activation=None` to return the logits of the "top" layer.

    Returns:
      A `keras.Model` instance.

    Raises:
        ValueError: in case of invalid argument for `weights`,
          or invalid input shape.
        ValueError: if `classifier_activation` is not `softmax` or `None` when
          using a pretrained top layer.
        ValueError: if `include_top` is True but `num_classes` is not 1000.
        ValueError: if `block_type` is not one of `{"X", "Y", "Z"}`

    >   Nr   zThe `weights` argument should be either `None` (random initialization), `imagenet` (pre-training on ImageNet), or the path to the weights file to be loaded.r   r   zWIf using `weights` as `'imagenet'` with `include_top` as true, `classes` should be 1000r1   )r-   min_sizedata_formatrequire_flattenweightsN)shape)tensorr   r]   r"   Z_Stage_)r   avgmax)r   outputsrY   z.h5r   z	_notop.h5r!   models)cache_subdir	file_hash)r~   iogfileexistsr   r   obtain_input_shaper   image_data_formatr   Inputis_keras_tensorr   get_source_inputsre   rw   r   r   rb   r   validate_activationr}   GlobalMaxPooling2Dr   ModelWEIGHTS_HASHESr   get_fileBASE_WEIGHTS_PATHload_weights)r*   r+   r,   r.   r-   
model_nameinclude_preprocessinginclude_topr   input_tensorinput_shapepoolingclassesclassifier_activation	img_inputr   r\   in_channelsZ	num_stager   out_channelsmodelfile_suffixr   	file_nameweights_pathr^   r^   r_   RegNetY  s    @	





r   z$keras.applications.regnet.RegNetX002zkeras.applications.RegNetX002
regnetx002c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr	   r*   r+   r,   r.   r-   	r   r   r   r   r   r   r   r   r   r   MODEL_CONFIGSr   r^   r^   r_   
RegNetX002  s     




r   z$keras.applications.regnet.RegNetX004zkeras.applications.RegNetX004
regnetx004c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr
   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX004  s     




r   z$keras.applications.regnet.RegNetX006zkeras.applications.RegNetX006
regnetx006c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX0068  s     




r   z$keras.applications.regnet.RegNetX008zkeras.applications.RegNetX008
regnetx008c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX008X  s     




r   z$keras.applications.regnet.RegNetX016zkeras.applications.RegNetX016
regnetx016c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX016x  s     




r   z$keras.applications.regnet.RegNetX032zkeras.applications.RegNetX032
regnetx032c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX032  s     




r   z$keras.applications.regnet.RegNetX040zkeras.applications.RegNetX040
regnetx040c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX040  s     




r   z$keras.applications.regnet.RegNetX064zkeras.applications.RegNetX064
regnetx064c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX064  s     




r   z$keras.applications.regnet.RegNetX080zkeras.applications.RegNetX080
regnetx080c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX080  s     




r   z$keras.applications.regnet.RegNetX120zkeras.applications.RegNetX120
regnetx120c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX120  s     




r   z$keras.applications.regnet.RegNetX160zkeras.applications.RegNetX160
regnetx160c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX1608  s     




r   z$keras.applications.regnet.RegNetX320zkeras.applications.RegNetX320
regnetx320c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetX320X  s     




r   z$keras.applications.regnet.RegNetY002zkeras.applications.RegNetY002
regnety002c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY002x  s     




r   z$keras.applications.regnet.RegNetY004zkeras.applications.RegNetY004
regnety004c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY004  s     




r   z$keras.applications.regnet.RegNetY006zkeras.applications.RegNetY006
regnety006c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY006  s     




r  z$keras.applications.regnet.RegNetY008zkeras.applications.RegNetY008
regnety008c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY008  s     




r  z$keras.applications.regnet.RegNetY016zkeras.applications.RegNetY016
regnety016c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY016  s     




r  z$keras.applications.regnet.RegNetY032zkeras.applications.RegNetY032
regnety032c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY032  s     




r  z$keras.applications.regnet.RegNetY040zkeras.applications.RegNetY040
regnety040c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY0408  s     




r
  z$keras.applications.regnet.RegNetY064zkeras.applications.RegNetY064
regnety064c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY064X  s     




r  z$keras.applications.regnet.RegNetY080zkeras.applications.RegNetY080
regnety080c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY080x  s     




r  z$keras.applications.regnet.RegNetY120zkeras.applications.RegNetY120
regnety120c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY120  s     




r  z$keras.applications.regnet.RegNetY160zkeras.applications.RegNetY160
regnety160c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr   r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY160  s     




r  z$keras.applications.regnet.RegNetY320zkeras.applications.RegNetY320
regnety320c	           	      C   sL   t td d td d td d td d td d | ||||||||dS )Nr    r*   r+   r,   r.   r-   r   r   r   r^   r^   r_   
RegNetY320  s     




r  r]   z*keras.applications.regnet.preprocess_inputc                 C   s   | S )a  A placeholder method for backward compatibility.

    The preprocessing logic has been included in the regnet model
    implementation. Users are no longer required to call this method to
    normalize the input data. This method does nothing and only kept as a
    placeholder to align the API surface between old and new version of model.

    Args:
      x: A floating point `numpy.array` or a `tf.Tensor`.
      data_format: Optional data format of the image tensor/array. Defaults to
        None, in which case the global setting
        `tf.keras.backend.image_data_format()` is used (unless you changed it,
        it defaults to "channels_last").{mode}

    Returns:
      Unchanged `numpy.array` or `tf.Tensor`.
    r^   )r\   r   r^   r^   r_   preprocess_input  s    r  z,keras.applications.regnet.decode_predictionsr6   c                 C   s   t j| |dS )N)top)r   decode_predictions)predsr  r^   r^   r_   r  )  s    r  )N)N)N)r!   N)r!   r   N)r!   r   r   N)N)r   N)	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r   TTr   NNNr   r   )	r  TTr   NNNr   r   )	r  TTr   NNNr   r   )	r  TTr   NNNr   r   )	r  TTr   NNNr   r   )	r	  TTr   NNNr   r   )	r  TTr   NNNr   r   )	r  TTr   NNNr   r   )	r  TTr   NNNr   r   )	r  TTr   NNNr   r   )	r  TTr   NNNr   r   )N)r6   )9__doc__Ztensorflow.compat.v2compatv2r~   kerasr   r   Zkeras.applicationsr   keras.enginer   keras.utilsr   r    tensorflow.python.util.tf_exportr   r   r   r   BASE_DOCSTRINGre   rw   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r
  r  r  r  r  r  formatr  r  r^   r^   r^   r_   <module>   sL  
k  ,?

 
&
a   
l    
\J        
                                                                                                                                                                                                  