
    &Vfw                        d dl 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ed
z   Zedz   Zedz   Zedz   Z	 	 	 	 	 	 	 	 	 	 	 	 	 d*dZ eddg          	 	 	 	 	 	 	 d+d            Z eddg          	 	 	 	 	 	 	 d+d            Z	 d,dZd-d Zd-d!Zd-d"Z ed#          d-d$            Z ed%          d.d'            Zej                            d(ej        ej        )          e_         ej        j         e_         dS )/    N)backend)layers)keras_export)imagenet_utils)
Functional)operation_utils)
file_utilszDhttps://storage.googleapis.com/tensorflow/keras-applications/nasnet/zNASNet-mobile.h5zNASNet-mobile-no-top.h5zNASNet-large.h5zNASNet-large-no-top.h5     `   T   imagenet  softmaxc           
      \	   t          j                    dk    rt          d          |dv s#t          j        |          st          d          |dk    r|r|
dk    rt          d          t          | t                    r,d| v r(|dk    r"t          d	t          |           z   d
z             |d}t          j	        | |dt          j                    ||          } t          j                    dk    rt          j        dd           |t          j        |           }n-t          j        |          st          j        ||           }n|}|d|dz  z  z  dk    rt          d|z            t          j                    dk    rdnd}|dz  } t          j        |dddddd          |          } t          j        |d d!d"#          |          }d}t#          ||||dz  z  d$%          \  }}t#          ||||z  d&%          \  }}t%          |          D ]}t'          |||d'|z  %          \  }}t#          ||||z  d(|z  %          \  }}|s|n|}t%          |          D ]$}t'          ||||z  d'||z   dz   z  %          \  }}%t#          ||||dz  z  d(d|z  z  %          \  }}|s|n|}t%          |          D ]*}t'          ||||dz  z  d'd|z  |z   dz   z  %          \  }}+ t          j        d)          |          }|rR t          j                    |          }t          j        ||            t          j        |
|d*+          |          }nE|	d,k    r t          j                    |          }n"|	d-k    r t          j                    |          }|t3          j        |          }n|}t7          ||d./          }|dk    r|d0k    rS|rt          j        d1t:          d2d34          }nt          j        d5t<          d2d64          }|                    |           n|dk    rS|rt          j        d7t@          d2d84          }nt          j        d9tB          d2d:4          }|                    |           n&t          d;          ||                    |           |S )<a  Instantiates a NASNet model.

    Reference:
    - [Learning Transferable Architectures for Scalable Image Recognition](
        https://arxiv.org/abs/1707.07012) (CVPR 2018)

    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 NasNet, call `keras.applications.nasnet.preprocess_input`
    on your inputs before passing them to the model.
    `nasnet.preprocess_input` will scale input pixels between -1 and 1.

    Args:
        input_shape: Optional shape tuple, the input shape
            is by default `(331, 331, 3)` for NASNetLarge and
            `(224, 224, 3)` for NASNetMobile.
            It should have exactly 3 input channels,
            and width and height should be no smaller than 32.
            E.g. `(224, 224, 3)` would be one valid value.
        penultimate_filters: Number of filters in the penultimate layer.
            NASNet models use the notation `NASNet (N @ P)`, where:
                -   N is the number of blocks
                -   P is the number of penultimate filters
        num_blocks: Number of repeated blocks of the NASNet model.
            NASNet models use the notation `NASNet (N @ P)`, where:
                -   N is the number of blocks
                -   P is the number of penultimate filters
        stem_block_filters: Number of filters in the initial stem block
        skip_reduction: Whether to skip the reduction step at the tail
            end of the network.
        filter_multiplier: Controls the width of the network.
            - If `filter_multiplier` < 1.0, proportionally decreases the number
                of filters in each layer.
            - If `filter_multiplier` > 1.0, proportionally increases the number
                of filters in each layer.
            - If `filter_multiplier` = 1, default number of filters from the
                paper are used at each layer.
        include_top: Whether to include the fully-connected
            layer at the top of the network.
        weights: `None` (random initialization) or
            `imagenet` (ImageNet weights)
        input_tensor: Optional Keras tensor (i.e. output of
            `layers.Input()`)
            to use as image input for the model.
        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 block.
            - `avg` means that global average pooling
                will be applied to the output of the
                last convolutional block, 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.
        default_size: Specifies the default image size of the model
        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. When loading pretrained weights,
            `classifier_activation` can only be `None` or `"softmax"`.

    Returns:
        A model instance.
    channels_firstzNASNet does not support the `channels_first` image data format. Switch to `channels_last` by editing your local config file at ~/.keras/keras.json>   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 1000NzWhen specifying the input shape of a NASNet and loading `ImageNet` weights, the input_shape argument must be static (no None entries). Got: `input_shape=z`.K      )default_sizemin_sizedata_formatrequire_flattenweightschannels_lasta  The NASNet family of models is only available for the input data format "channels_last" (width, height, channels). However your settings specify the default data format "channels_first" (channels, width, height). You should set `image_data_format="channels_last"` in your Keras config located at ~/.keras/keras.json. The model being returned right now will expect inputs to follow the "channels_last" data format.r   )
stacklevel)shape)tensorr      r   zwFor NASNet-A models, the `penultimate_filters` must be a multiple of 24 * (`filter_multiplier` ** 2). Current value: %d      r"   r   r   validF
stem_conv1	he_normal)stridespaddinguse_biasnamekernel_initializerZڊ?MbP?stem_bn1axismomentumepsilonr*   stem_1block_idstem_2z%dz	reduce_%drelupredictions)
activationr*   avgmaxNASNetr*      znasnet_mobile.h5models 020fb642bf7360b370c678b08e0adf61)cache_subdir	file_hashznasnet_mobile_no_top.h5 1ed92395b5b598bdda52abe5c0dbfd63znasnet_large.h5 11577c9a518f0070763c2b964a382f17znasnet_large_no_top.h5 d81d89dc07e6e56530c4e77faddd61b5zDImageNet weights can only be loaded with NASNetLarge or NASNetMobile)"r   image_data_format
ValueErrorr	   exists
isinstancetuplestrr   obtain_input_shapewarningswarnr   Inputis_keras_tensorConv2DBatchNormalization_reduction_a_cellrange_normal_a_cell
ActivationGlobalAveragePooling2Dvalidate_activationDenseGlobalMaxPooling2Dr   get_source_inputsr   get_fileNASNET_MOBILE_WEIGHT_PATH NASNET_MOBILE_WEIGHT_PATH_NO_TOPload_weightsNASNET_LARGE_WEIGHT_PATHNASNET_LARGE_WEIGHT_PATH_NO_TOP)input_shapepenultimate_filters
num_blocksstem_block_filtersskip_reductionfilter_multiplierinclude_topr   input_tensorpoolingclassesr   classifier_activation	img_inputchannel_dimfiltersxpip0inputsmodelweights_paths                          Z/var/www/html/software/conda/lib/python3.11/site-packages/keras/src/applications/nasnet.pyr<   r<      s   x  ""&6661
 
 	

 )))Z->w-G-G)<
 
 	
 *D0
 
 	
 	;&&

Kz!!4 7:+6F6FG JNN
 
 	
  !3!-//#  K  ""o559 	
 	
 	
 	
 L{333		&|44 	%LLLLII$Ib$5q$89:a??D!"
 
 	
 0226FFF!!BK!R'G	&	 	 	 	 	A	!64j	 	 			 		A 	A	1g+Q./(  DAq 	1g**X  DAq : B BaGdajAAA11	1g))K:4N  EAr !'aA: 
 
''Z!^a/0	
 
 
11 		#Q&&J/	  EAr !'aA: 
 
'**Q^a/!34	
 
 
11 	"&!!!$$A 
/+F)++A..*+@'JJJ
FL 5M
 
 

  e/-//22AA+)++A..A  2<@@vqx000E *3 )2&-!)@	       *2-4!)@	      |,,,,S   )2%,!)@	       *2,3!)@	      |,,,,#   
	7###L    z&keras.applications.nasnet.NASNetMobilezkeras.applications.NASNetMobilec                     t          j                     dk    rt          d          |s| d} t          | ddddd	|||||d
|          S )a	  Instantiates a Mobile NASNet model in ImageNet mode.

    Reference:
    - [Learning Transferable Architectures for Scalable Image Recognition](
        https://arxiv.org/abs/1707.07012) (CVPR 2018)

    Optionally loads weights pre-trained on ImageNet.
    Note that the data format convention used by the model is
    the one specified in your Keras config at `~/.keras/keras.json`.

    Note: each Keras Application expects a specific kind of input preprocessing.
    For NASNet, call `keras.applications.nasnet.preprocess_input` on your
    inputs before passing them to the model.

    Args:
        input_shape: Optional shape tuple, only to be specified
            if `include_top` is False (otherwise the input shape
            has to be `(224, 224, 3)` for NASNetMobile
            It should have exactly 3 inputs channels,
            and width and height should be no smaller than 32.
            E.g. `(224, 224, 3)` would be one valid value.
        include_top: Whether to include the fully-connected
            layer at the top of the network.
        weights: `None` (random initialization) or
            `imagenet` (ImageNet weights). For loading `imagenet` weights,
            `input_shape` should be (224, 224, 3)
        input_tensor: Optional Keras tensor (i.e. output of
            `layers.Input()`)
            to use as image input for the model.
        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.  When loading pretrained weights, `classifier_activation` can
            only be `None` or `"softmax"`.

    Returns:
        A Keras model instance.
    torchz}NASNetMobile is not available with the torch backend at this time due to an outstanding bug. If interested, please open a PR.N)r>   r>   r"   i      r   Fr   r>   rc   rd   re   rf   rg   rh   r   ri   rj   rk   r   rl   )r   rG   r<   rb   rh   r   ri   rj   rk   rl   s          rw   NASNetMobiler~   9  s    H G##/
 
 	

  $;.# !3   rx   z%keras.applications.nasnet.NASNetLargezkeras.applications.NASNetLargec                 :    t          | ddddd|||||d|          S )a	  Instantiates a NASNet model in ImageNet mode.

    Reference:
    - [Learning Transferable Architectures for Scalable Image Recognition](
        https://arxiv.org/abs/1707.07012) (CVPR 2018)

    Optionally loads weights pre-trained on ImageNet.
    Note that the data format convention used by the model is
    the one specified in your Keras config at `~/.keras/keras.json`.

    Note: each Keras Application expects a specific kind of input preprocessing.
    For NASNet, call `keras.applications.nasnet.preprocess_input` on your
    inputs before passing them to the model.

    Args:
        input_shape: Optional shape tuple, only to be specified
            if `include_top` is False (otherwise the input shape
            has to be `(331, 331, 3)` for NASNetLarge.
            It should have exactly 3 inputs channels,
            and width and height should be no smaller than 32.
            E.g. `(224, 224, 3)` would be one valid value.
        include_top: Whether to include the fully-connected
            layer at the top of the network.
        weights: `None` (random initialization) or
            `imagenet` (ImageNet weights).  For loading `imagenet` weights,
            `input_shape` should be (331, 331, 3)
        input_tensor: Optional Keras tensor (i.e. output of
            `layers.Input()`)
            to use as image input for the model.
        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.  When loading pretrained weights, `classifier_activation`
            can only be `None` or `"softmax"`.

    Returns:
        A Keras model instance.
    r
   r   r   Tr   r   r|   )r<   r}   s          rw   NASNetLarger     sC    H  !3   rx   r!   r   r   c           
         t          j                    dk    rdnd}t          j        d|           5   t          j        d          |           }|dk    r8 t          j        t          j        ||          d|           |          }d	}nd
} t          j        |||d| |d          |          } t          j	        |ddd|           |          } t          j        d          |          } t          j        ||d| d
d          |          } t          j	        |ddd|           |          }ddd           n# 1 swxY w Y   |S )aF  Adds 2 blocks of [relu-separable conv-batchnorm].

    Args:
        ip: Input tensor
        filters: Number of output filters per layer
        kernel_size: Kernel size of separable convolutions
        strides: Strided convolution for downsampling
        block_id: String block_id

    Returns:
        A Keras tensor
    r   r   r    separable_conv_block_r7   r#   separable_conv_1_pad_r(   r*   r$   sameseparable_conv_1_F)r'   r*   r(   r)   r,   r-   separable_conv_1_bn_r/   separable_conv_2_)r*   r(   r)   separable_conv_2_bn_N)
r   rF   
name_scoper   rV   ZeroPadding2Dr   correct_padSeparableConv2DrR   )ipro   kernel_sizer'   r5   rn   rp   conv_pads           rw   _separable_conv_blockr     s.    0226FFF!!BK		>H>>	?	? % %%Ff%%b))f$&21kBB7X77    A HHH
F"/X//
 
 
  
F%222	
 
 

   &Ff%%a((
F"/X//
 
 
  
F%222	
 
 

  A% % % % % % % % % % % % % % %L Hs   DEEEc                 (   t          j                    dk    rdnd}t          j                    dk    rdnd}t          j        d          5  | |} n)| j        |         |j        |         k    rdt          j        d|           5   t	          j        d	d
|           |           }  t	          j        dddd|           |           } t	          j        |dz  dddd| d          |          } t	          j        d          |           } t	          j	        d          |          } t	          j        dddd|           |          } t	          j        |dz  dddd| d          |          }t	          j
        ||g|          }  t	          j        |ddd|            |           } ddd           n# 1 swxY w Y   n| j        |         |k    rt          j        d!|           5   t	          j        d	          |           }  t	          j        |dddd"| dd#          |           }  t	          j        |ddd|            |           } ddd           n# 1 swxY w Y   ddd           n# 1 swxY w Y   | S )$a  Adjusts the input `previous path` to match the shape of the `input`.

    Used in situations where the output number of filters needs to be changed.

    Args:
        p: Input tensor which needs to be modified
        ip: Input tensor whose shape needs to be matched
        filters: Number of output filters to be matched
        block_id: String block_id

    Returns:
        Adjusted Keras tensor
    r   r   r    r   adjust_blockNadjust_reduction_block_r7   adjust_relu_1_r=   r   r#   r$   adjust_avg_pool_1_r'   r(   r*   r   Fadjust_conv_1_r&   )r(   r)   r*   r+   )r   r   r   )r(   )r   r   r   )croppingadjust_avg_pool_2_adjust_conv_2_)r0   r,   r-   
adjust_bn_r/   adjust_projection_block_adjust_conv_projection_r'   r(   r*   r)   r+   )r   rF   r   r   r   rV   AveragePooling2DrQ   r   
Cropping2DconcatenaterR   )rq   r   ro   r5   rn   img_dimp1p2s           rw   _adjust_blockr   %  sE    0226FFF!!BK,..2BBBaaG		N	+	+ B B9AAWW'!222#$Hh$H$HII * *OF%f3NH3N3NOOO V,"#8h88	  
  V]qL""4(44'2     DV)2BCCCAFFAV&0@AAA"EEV,"#8h88	  
  V]qL""4(44'2     &BxkBBBF-$# 0h00	  
  K* * * * * * * * * * * * * * *X W[!W,,#$Ix$I$IJJ  -F%f--a00FM""=8=="'2    F-$# 0h00	  
                eB B B B B B B B B B B B B B BF Hs\   ;JD5G;JG	JG	,J;A)I0$J0I4	4J7I4	8JJJc                 H   t          j                    dk    rdnd}t          j        d|           5  t          || ||          } t	          j        d          |           } t	          j        |dddd| d	d
          |          } t	          j        |ddd|           |          }t          j        d          5  t          ||dd|           }t          ||d|           }t	          j	        ||gd|           }ddd           n# 1 swxY w Y   t          j        d          5  t          ||dd|           }	t          ||dd|           }
t	          j	        |	|
gd|           }ddd           n# 1 swxY w Y   t          j        d          5   t	          j
        dddd|            |          }t	          j	        ||gd!|           }ddd           n# 1 swxY w Y   t          j        d"          5   t	          j
        dddd#|            |          } t	          j
        dddd$|            |          }t	          j	        ||gd%|           }ddd           n# 1 swxY w Y   t          j        d&          5  t          ||d'|           }t	          j	        ||gd(|           }ddd           n# 1 swxY w Y   t	          j        ||||||g|d)| *          }ddd           n# 1 swxY w Y   || fS )+zAdds a Normal cell for NASNet-A (Fig. 4 in the paper).

    Args:
        ip: Input tensor `x`
        p: Input tensor `p`
        filters: Number of output filters
        block_id: String block_id

    Returns:
        A Keras tensor
    r   r   r    normal_A_block_r7   r   r   normal_conv_1_Fr&   r   r,   r-   normal_bn_1_r/   block_1   r   normal_left1_)r   r5   normal_right1_r4   normal_add_1_r=   Nblock_2normal_left2_r!   normal_right2_normal_add_2_block_3normal_left3_r   normal_add_3_block_4normal_left4_normal_right4_normal_add_4_block_5normal_left5_normal_add_5_normal_concat_r0   r*   )r   rF   r   r   r   rV   rQ   rR   r   addr   r   )r   rq   ro   r5   rn   hx1_1x1_2x1x2_1x2_2x2x3x4_1x4_2x4x5rp   s                     rw   rU   rU   |  s    0226FFF!!BK		8h88	9	9 K
 K
!R(33%Ff%%b))
FM,(,,*
 
 
  
F%***	
 
 

   	** 
	K 
	K("333	  D )7%@h%@%@  D T4L/Ix/I/IJJJB
	K 
	K 
	K 
	K 
	K 
	K 
	K 
	K 
	K 
	K 
	K 
	K 
	K 
	K 
	K 	** 	K 	K(7F-GX-G-G  D )7F-Hh-H-H  D T4L/Ix/I/IJJJB	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	** 	F 	F(/X//	  
  B RG*D(*D*DEEEB	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	** 	K 	K6*/X//	  
  D6*0h00	  
  D T4L/Ix/I/IJJJB	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	** 	F 	F&7%?X%?%?  B RG*D(*D*DEEEB		F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F BB#,(,,
 
 
OK
 K
 K
 K
 K
 K
 K
 K
 K
 K
 K
 K
 K
 K
 K
X b5Ls   BLAD	LD	LD	L4AF<LF	LF	L'A G3'L3G7	7L:G7	;LA$J6LJ	L	J	
L!1KLK"	"L%K"	&#LLLc                    t          j                    dk    rdnd}t          j        d|           5  t          || ||          } t	          j        d          |           } t	          j        |dddd| d	d
          |          } t	          j        |ddd|           |          } t	          j        t          j
        |d          d|           |          }t          j        d          5  t          ||ddd|           }t          ||ddd|           }t	          j        ||gd|           }	ddd           n# 1 swxY w Y   t          j        d          5   t	          j        dddd | !          |          }
t          ||ddd"|           }t	          j        |
|gd#|           }ddd           n# 1 swxY w Y   t          j        d$          5   t	          j        dddd%| !          |          }t          ||ddd&|           }t	          j        ||gd'|           }ddd           n# 1 swxY w Y   t          j        d(          5   t	          j        dddd)| !          |	          }t	          j        ||g          }ddd           n# 1 swxY w Y   t          j        d*          5  t          |	|dd)| +          } t	          j        dddd,| !          |          }t	          j        ||gd-|           }ddd           n# 1 swxY w Y   t	          j        ||||g|d.| /          }|| fcddd           S # 1 swxY w Y   dS )0zAdds a Reduction cell for NASNet-A (Fig. 4 in the paper).

    Args:
      ip: Input tensor `x`
      p: Input tensor `p`
      filters: Number of output filters
      block_id: String block_id

    Returns:
      A Keras tensor
    r   r   r    reduction_A_block_r7   r   r   reduction_conv_1_Fr&   r   r,   r-   reduction_bn_1_r/   r"   reduction_pad_1_r   r   r   r#   reduction_left1_)r'   r5   )   r   reduction_right1_reduction_add_1_r=   Nr   r!   r$   reduction_left2_r   reduction_right2_reduction_add_2_r   reduction_left3_reduction_right3_reduction_add3_r   reduction_left4_r   r4   reduction_right5_reduction_add4_reduction_concat_r   )r   rF   r   r   r   rV   rQ   rR   r   r   r   r   r   MaxPooling2Dr   r   )r   rq   ro   r5   rn   r   h3r   r   r   r   r   r   x3_1x3_2r   r   x5_1x5_2r   rp   s                        rw   rS   rS     s    0226FFF!!BK		;;;	<	< c c!R(33%Ff%%b))
FM/X//*
 
 
  
F%-8--	
 
 

  
V!".q!44.H..
 
 
  
 	** 	N 	N(6H66  D )7X77  D T4L/L(/L/LMMMB	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N" 	** 	N 	N6&222	  
  D )7X77  D T4L/L(/L/LMMMB	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N  	** 	M 	M6*222	  
  D )7X77  D T4L/K/K/KLLLB	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M  	** 	& 	&(222	  
  B RH%%B	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	** 
	M 
	M(GV.K.K.K  D6&333	  
  D T4L/K/K/KLLLB
	M 
	M 
	M 
	M 
	M 
	M 
	M 
	M 
	M 
	M 
	M 
	M 
	M 
	M 
	M R/X//
 
 

 "uGc c c c c c c c c c c c c c c c c cs   CM17A
EM1E	M1E	M1,AGM1G	M1G	M1.AIM1I	M1I	M10;J7+M17J;	;M1>J;	?M1AL8,M18L<	<M1?L<	 $M11M58M5z*keras.applications.nasnet.preprocess_inputc                 0    t          j        | |d          S )Ntf)r   mode)r   preprocess_input)rp   r   s     rw   r   r   M  s#    *	{   rx   z,keras.applications.nasnet.decode_predictionsr   c                 .    t          j        | |          S )N)top)r   decode_predictions)predsr   s     rw   r   r   T  s    ,U<<<<rx    )r   reterror)Nr
   r   r   Tr   Tr   NNr   Nr   )NTr   NNr   r   )r!   r   N)N)r   )!rM   	keras.srcr   r   keras.src.api_exportr   keras.src.applicationsr   keras.src.modelsr   keras.src.opsr   keras.src.utilsr	   BASE_WEIGHTS_PATHr]   r^   r`   ra   r<   r~   r   r   r   rU   rS   r   r   PREPROCESS_INPUT_DOCformatPREPROCESS_INPUT_RET_DOC_TFPREPROCESS_INPUT_ERROR_DOC__doc__ rx   rw   <module>r     s                - - - - - - 1 1 1 1 1 1 ' ' ' ' ' ' ) ) ) ) ) ) & & & & & & K  .0BB #47P#P  ,/@@ "36N"N  #b b b bJ	 0)  #T T T Tn /(  #L L L L` ?C7 7 7 7tT T T TnZ Z Z Zzq q q qh :;;   <; <=== = = >== *>EE	2

3 F    
 ,>F    rx   