
    0hp                         d Z ddlmc 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  ed	 e       d
      Z G d d      Z G d d      Z edg        G d dej(                               Zy)z>FeatureSpace structured data preprocessing & encoding utility.    N)backend)
base_layer)
saving_lib)serialization_lib)
LazyLoader)keras_exportlayersztf_keras.src.layersc                   :    e Zd ZddZed        Zd Zed        Zy)Crossc                 d    |dvrt        d|       t        |      | _        || _        || _        y )N>   intone_hotzdInvalid value for argument `output_mode`. Expected one of {'int', 'one_hot'}. Received: output_mode=)
ValueErrortuplefeature_namescrossing_dimoutput_mode)selfr   r   r   s       Z/var/www/html/engine/venv/lib/python3.12/site-packages/tf_keras/src/utils/feature_space.py__init__zCross.__init__    sF    00))47 
 #=1(&    c                 8    dj                  | j                        S )N_X_)joinr   r   s    r   namez
Cross.name+   s    zz$,,--r   c                 J    | j                   | j                  | j                  dS )Nr   r   r   r   r   s    r   
get_configzCross.get_config/   s'    !// --++
 	
r   c                      | di |S N r"   clsconfigs     r   from_configzCross.from_config6       }V}r   Nr   )	__name__
__module____qualname__r   propertyr   r   classmethodr&   r"   r   r   r   r      s4    	' . .
  r   r   c                   (    e Zd Zd Zd Zed        Zy)Featurec                     |dvrt        d|       || _        t        |t              rt	        j
                  |      }|| _        || _        y )N>   r   floatr   zmInvalid value for argument `output_mode`. Expected one of {'int', 'one_hot', 'float'}. Received: output_mode=)r   dtype
isinstancedictr   deserialize_keras_objectpreprocessorr   )r   r2   r6   r   s       r   r   zFeature.__init__<   s_    99))47 
 
lD),EEL )&r   c                 p    | j                   t        j                  | j                        | j                  dS )Nr2   r6   r   )r2   r   serialize_keras_objectr6   r   r   s    r   r   zFeature.get_configK   s5    ZZ-DD!!  ++
 	
r   c                      | di |S r!   r"   r#   s     r   r&   zFeature.from_configT   r'   r   N)r)   r*   r+   r   r   r-   r&   r"   r   r   r/   r/   ;   s     '
  r   r/   zkeras.utils.FeatureSpace)v1c                   h   e Zd ZdZed"d       Zed        Zed#d       Zed$d       Zed#d       Z	e	 d%d       Z
e	 	 	 	 d&d	       Ze	 	 	 	 d&d
       Zed'd       Zed'd       Z	 	 	 	 	 d(dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zed        Zd Zd Z d Z!d  Z"d! Z#y))FeatureSpacea   One-stop utility for preprocessing and encoding structured data.

    Arguments:
        feature_names: Dict mapping the names of your features to their
            type specification, e.g. `{"my_feature": "integer_categorical"}`
            or `{"my_feature": FeatureSpace.integer_categorical()}`.
            For a complete list of all supported types, see
            "Available feature types" paragraph below.
        output_mode: One of `"concat"` or `"dict"`. In concat mode, all
            features get concatenated together into a single vector.
            In dict mode, the FeatureSpace returns a dict of individually
            encoded features (with the same keys as the input dict keys).
        crosses: List of features to be crossed together, e.g.
            `crosses=[("feature_1", "feature_2")]`. The features will be
            "crossed" by hashing their combined value into
            a fixed-length vector.
        crossing_dim: Default vector size for hashing crossed features.
            Defaults to `32`.
        hashing_dim: Default vector size for hashing features of type
            `"integer_hashed"` and `"string_hashed"`. Defaults to `32`.
        num_discretization_bins: Default number of bins to be used for
            discretizing features of type `"float_discretized"`.
            Defaults to `32`.

    **Available feature types:**

    Note that all features can be referred to by their string name,
    e.g. `"integer_categorical"`. When using the string name, the default
    argument values are used.

    ```python
    # Plain float values.
    FeatureSpace.float(name=None)

    # Float values to be preprocessed via featurewise standardization
    # (i.e. via a `keras.layers.Normalization` layer).
    FeatureSpace.float_normalized(name=None)

    # Float values to be preprocessed via linear rescaling
    # (i.e. via a `keras.layers.Rescaling` layer).
    FeatureSpace.float_rescaled(scale=1., offset=0., name=None)

    # Float values to be discretized. By default, the discrete
    # representation will then be one-hot encoded.
    FeatureSpace.float_discretized(
        num_bins, bin_boundaries=None, output_mode="one_hot", name=None)

    # Integer values to be indexed. By default, the discrete
    # representation will then be one-hot encoded.
    FeatureSpace.integer_categorical(
        max_tokens=None, num_oov_indices=1, output_mode="one_hot", name=None)

    # String values to be indexed. By default, the discrete
    # representation will then be one-hot encoded.
    FeatureSpace.string_categorical(
        max_tokens=None, num_oov_indices=1, output_mode="one_hot", name=None)

    # Integer values to be hashed into a fixed number of bins.
    # By default, the discrete representation will then be one-hot encoded.
    FeatureSpace.integer_hashed(num_bins, output_mode="one_hot", name=None)

    # String values to be hashed into a fixed number of bins.
    # By default, the discrete representation will then be one-hot encoded.
    FeatureSpace.string_hashed(num_bins, output_mode="one_hot", name=None)
    ```

    Examples:

    **Basic usage with a dict of input data:**

    ```python
    raw_data = {
        "float_values": [0.0, 0.1, 0.2, 0.3],
        "string_values": ["zero", "one", "two", "three"],
        "int_values": [0, 1, 2, 3],
    }
    dataset = tf.data.Dataset.from_tensor_slices(raw_data)

    feature_space = FeatureSpace(
        features={
            "float_values": "float_normalized",
            "string_values": "string_categorical",
            "int_values": "integer_categorical",
        },
        crosses=[("string_values", "int_values")],
        output_mode="concat",
    )
    # Before you start using the FeatureSpace,
    # you must `adapt()` it on some data.
    feature_space.adapt(dataset)

    # You can call the FeatureSpace on a dict of data (batched or unbatched).
    output_vector = feature_space(raw_data)
    ```

    **Basic usage with `tf.data`:**

    ```python
    # Unlabeled data
    preprocessed_ds = unlabeled_dataset.map(feature_space)

    # Labeled data
    preprocessed_ds = labeled_dataset.map(lambda x, y: (feature_space(x), y))
    ```

    **Basic usage with the TF-Keras Functional API:**

    ```python
    # Retrieve a dict TF-Keras Input objects
    inputs = feature_space.get_inputs()
    # Retrieve the corresponding encoded TF-Keras tensors
    encoded_features = feature_space.get_encoded_features()
    # Build a Functional model
    outputs = keras.layers.Dense(1, activation="sigmoid")(encoded_features)
    model = keras.Model(inputs, outputs)
    ```

    **Customizing each feature or feature cross:**

    ```python
    feature_space = FeatureSpace(
        features={
            "float_values": FeatureSpace.float_normalized(),
            "string_values": FeatureSpace.string_categorical(max_tokens=10),
            "int_values": FeatureSpace.integer_categorical(max_tokens=10),
        },
        crosses=[
            FeatureSpace.cross(("string_values", "int_values"), crossing_dim=32)
        ],
        output_mode="concat",
    )
    ```

    **Returning a dict of integer-encoded features:**

    ```python
    feature_space = FeatureSpace(
        features={
            "string_values": FeatureSpace.string_categorical(output_mode="int"),
            "int_values": FeatureSpace.integer_categorical(output_mode="int"),
        },
        crosses=[
            FeatureSpace.cross(
                feature_names=("string_values", "int_values"),
                crossing_dim=32,
                output_mode="int",
            )
        ],
        output_mode="dict",
    )
    ```

    **Specifying your own TF-Keras preprocessing layer:**

    ```python
    # Let's say that one of the features is a short text paragraph that
    # we want to encode as a vector (one vector per paragraph) via TF-IDF.
    data = {
        "text": ["1st string", "2nd string", "3rd string"],
    }

    # There's a TF-Keras layer for this: TextVectorization.
    custom_layer = layers.TextVectorization(output_mode="tf_idf")

    # We can use FeatureSpace.feature to create a custom feature
    # that will use our preprocessing layer.
    feature_space = FeatureSpace(
        features={
            "text": FeatureSpace.feature(
                preprocessor=custom_layer, dtype="string", output_mode="float"
            ),
        },
        output_mode="concat",
    )
    feature_space.adapt(tf.data.Dataset.from_tensor_slices(data))
    output_vector = feature_space(data)
    ```

    **Retrieving the underlying TF-Keras preprocessing layers:**

    ```python
    # The preprocessing layer of each feature is available in `.preprocessors`.
    preprocessing_layer = feature_space.preprocessors["feature1"]

    # The crossing layer of each feature cross is available in `.crossers`.
    # It's an instance of keras.layers.HashedCrossing.
    crossing_layer = feature_space.crossers["feature1_X_feature2"]
    ```

    **Saving and reloading a FeatureSpace:**

    ```python
    feature_space.save("myfeaturespace.keras")
    reloaded_feature_space = keras.models.load_model("myfeaturespace.keras")
    ```
    c                     t        |||      S )N)r   )r   )r$   r   r   r   s       r   crosszFeatureSpace.cross   s    ]LkJJr   c                     t        |||      S N)r/   )r$   r2   r6   r   s       r   featurezFeatureSpace.feature$  s    ulK88r   Nc                     ddl m} |xs t        j                  d      }|j	                  d| d      }t        d|d      S )Nr   )identityr1   float32_preprocessor)r2   r   r8   )tf_keras.src.layers.corerD   r   unique_object_nameIdentityr/   )r$   r   rD   r6   s       r   r1   zFeatureSpace.float(  sQ    5:w11':((TF-"8 ) 
 ,G
 	
r   c                     |xs t        j                  d      }t        j                  ||| d      }t	        d|d      S )Nfloat_rescaledrF   )scaleoffsetr   rE   r1   r8   )r   rH   r	   	Rescalingr/   )r$   rL   rM   r   r6   s        r   rK   zFeatureSpace.float_rescaled4  sQ    Cw112BC''v]-C ( 
 ,G
 	
r   c                     |xs t        j                  d      }t        j                  d| d      }t	        d|d      S )Nfloat_normalizedrF   )axisr   rE   r1   r8   )r   rH   r	   Normalizationr/   )r$   r   r6   s      r   rP   zFeatureSpace.float_normalized>  sO    Ew112DE++TF-0 , 
 ,G
 	
r   c                     |xs t        j                  d      }t        j                  ||| d      }t	        d||      S )Nfloat_discretizedrF   )num_binsbin_boundariesr   rE   r8   )r   rH   r	   Discretizationr/   )r$   rV   rW   r   r   r6   s         r   rU   zFeatureSpace.float_discretizedH  sU     Fw112EF,,)6' - 

 ,K
 	
r   c                     |xs t        j                  d      }t        j                  | d||      }t	        d||      S )Ninteger_categoricalrF   r   
max_tokensnum_oov_indicesint64r8   )r   rH   r	   IntegerLookupr/   r$   r\   r]   r   r   r6   s         r   rZ   z FeatureSpace.integer_categoricalV  sU     Hw112GH++6'!+ , 

 +
 	
r   c                     |xs t        j                  d      }t        j                  | d||      }t	        d||      S )Nstring_categoricalrF   r[   stringr8   )r   rH   r	   StringLookupr/   r`   s         r   rb   zFeatureSpace.string_categoricalh  sU     Gw112FG**6'!+ + 

 ;
 	
r   c                     |xs t        j                  d      }t        j                  | d|      }t	        d||      S )Nstring_hashedrF   r   rV   rc   r8   r   rH   r	   Hashingr/   r$   rV   r   r   r6   s        r   rf   zFeatureSpace.string_hashedz  sL    Bw11/B~~6'( & 
 ;
 	
r   c                     |xs t        j                  d      }t        j                  | d|      }t	        d||      S )Ninteger_hashedrF   rg   r^   r8   rh   rj   s        r   rl   zFeatureSpace.integer_hashed  sM    Cw112BC~~6'( & 
 +
 	
r   c           	         |st        d      || _        || _        || _        |j	                         D ci c]  \  }}|| j                  ||       c}}| _        g | _        |rt        |j                               }	|D ]  }
t        |
t              rt        j                  |
      }
t        |
t              r| j                  j                  |
       T|st        d      |
D ]  }||	vst        d|
        | j                  j                  t        |
|              | j                  D 
ci c]  }
|
j                   |
 c}
| _        |dvrt        d|       || _        | j                  j	                         D ci c]  \  }}|| j'                  ||       c}}| _        | j                  j	                         D ci c]  \  }}||j*                   c}}| _        d | _        | j                  D 
ci c]  }
|
j                   | j1                  |
        c}
| _        i | _        d| _        d| _        d | _        d | _        d | _        y c c}}w c c}
w c c}}w c c}}w c c}
w )Nz0The `features` argument cannot be None or empty.zzWhen specifying `crosses`, the argument `crossing_dim` (dimensionality of the crossing space) should be specified as well.zwAll features referenced in the `crosses` argument should be present in the `features` dict. Received unknown features: )r   >   r4   concatzdInvalid value for argument `output_mode`. Expected one of {'dict', 'concat'}. Received: output_mode=F) r   r   hashing_dimnum_discretization_binsitems_standardize_featurefeaturescrossessetkeysr3   r4   r   r5   r   appendr   crosses_by_namer   _feature_to_inputinputsr6   preprocessorsencoded_features_cross_to_crossercrossersone_hot_encodersbuilt_is_adaptedrn   _preprocessed_features_names_crossed_features_names)r   rs   r   rt   r   ro   rp   r   valuefeature_setr?   keys               r   r   zFeatureSpace.__init__  s|    OPP(&'>$  (~~/
e $++D%88
 hmmo.K  QeT*-FFuMEeU+LL''.'(;   % k1",!> ?DW!F#  LL''e,(OP+Q, @D||Le

E 1L00))47 
 '  $}}224
e $((u55

 9=8K8K8M
)4uD%$$$
 !%CG<<
:?EJJ..u55
 !#
 ,0)'+$o
:  M


s   I0III!:#I'c                 F    t         j                  d|j                  |      S )N)   )shaper2   r   )r	   Inputr2   r   r   rB   s      r   ry   zFeatureSpace._feature_to_input  s    ||$gmm$|GGr   c                 >   t        |t              r|S t        |t              rt        j                  |      S |dk(  r| j                  |      S |dk(  r| j                  |      S |dk(  r| j                  |      S |dk(  r| j                  || j                        S |dk(  r| j                  |      S |dk(  r| j                  |      S |d	k(  r| j                  | j                  |      S |d
k(  r| j                  | j                  |      S t        d|       )Nr1   r   rP   rK   rU   rg   rZ   rb   rl   rf   zInvalid feature type: )r3   r/   r4   r   r5   r1   rP   rK   rU   rp   rZ   rb   rl   ro   rf   r   r   s      r   rr   z!FeatureSpace._standardize_feature  sC   gw'Ngt$$==gFFg::4:((**((d(33((&&D&11++))D$@$@ *   --+++66,,***55((&&t'7'7d&CC'%%d&6&6T%BB5gY?@@r   c                 X    t         j                  |j                  |j                        S )Nr   )r	   HashedCrossingr   r   )r   r?   s     r   r}   zFeatureSpace._cross_to_crosser  s"    $$U%7%7ejj$IIr   c                     g }| j                   j                         D ]V  }| j                  |   }t        |t        j
                        r|j                  9t        |d      sF|j                  |       X |S )Nadapt)	rs   rv   r{   r3   r	   rS   
input_meanhasattrrw   )r   adaptable_preprocessorsr   r6   s       r   _list_adaptable_preprocessorsz*FeatureSpace._list_adaptable_preprocessors  su    "$MM&&( 	5D--d3L ,(<(<=**6|W-'..t4	5 '&r   c                 &   t        |t        j                  j                        st	        d| dt        |       d      | j                         D ]  |j                  fd      }| j                     }|j                  d      D ]  } j                  j                  dk(  r|j                  d      }|j                  j                  dv r|j                  d	       }|j                  |        d
| _        | j                          d
| _        y )NzE`adapt()` can only be called on a tf.data.Dataset. Received instead: 
 (of type )c                     |    S rA   r"   )xr   s    r   <lambda>z$FeatureSpace.adapt.<locals>.<lambda>  s    AdG r   r   r       >   r   r   c                 .    t        j                  | d      S )NrQ   )tfexpand_dims)r   s    r   r   z$FeatureSpace.adapt.<locals>.<lambda>!  s    bnnQ3 r   T)r3   r   dataDatasetr   typer   mapr{   taker   rankbatchr   r   get_encoded_featuresr   )r   datasetfeature_datasetr6   r   r   s        @r   r   zFeatureSpace.adapt  s
   '277??3%%,IZWaI 
 668 	0D &kk*;<O--d3L %))!, ww||q "1"7"7";ww||v% #2"5"53# /1	02  !!#
r   c                 :    | j                          | j                  S rA   )_check_if_builtrz   r   s    r   
get_inputszFeatureSpace.get_inputs(  s    {{r   c                     | j                          | j                  E| j                  | j                        }| j	                  |      }| j                  ||      }|| _        | j                  S rA   )_check_if_adaptedr|   _preprocess_featuresrz   _cross_features_merge_features)r   preprocessed_featurescrossed_featuresmerged_featuress       r   r   z!FeatureSpace.get_encoded_features,  sm       ($($=$=dkk$J!#334IJ"22%'7O %4D!$$$r   c                 v    |j                         D ci c]  }| | j                  |   ||          c}S c c}w rA   )rv   r{   )r   rs   r   s      r   r   z!FeatureSpace._preprocess_features8  sF     !
 *$$$T*8D>::
 	
 
s    6c                     i }| j                   D ]L  }|j                  D cg c]  }||   	 }} | j                  |j                     |      }|||j                  <   N |S c c}w rA   )rt   r   r~   r   )r   rs   all_outputsr?   r   rz   outputss          r   r   zFeatureSpace._cross_features>  sl    \\ 	.E161D1DEhtnEFE/dmmEJJ/7G&-K

#	.  Fs   A c                    | j                   s<t        |j                               | _         t        |j                               | _        | j                   | j                  z   }| j                   D cg c]  }||   	 c}| j                  D cg c]  }||   	 c}z   }| j                  dk(  ri }ng }| j
                  rt        ||      D ]Q  \  }}| j                  j                  |d       }	|	r |	|      }| j                  dk(  r||<   Aj                  |       S | j                  dk(  rS | j                        S | j                   D cg c]  }| j                  |    c}| j                  D cg c]  }| j                  |    c}z   }
t        |||
      D ]  \  }}}|j                  j                  }|j                  dk(  rp| j                  j                  |      xs | j                   j                  |      }d }|j                  j                  j#                  d      st%        d| d| d      t'        |t(        j*                  t(        j,                  f      r|j/                         }nt'        |t(        j0                        r|j2                  }nmt'        |t(        j4                        r|j6                  }nFt'        |t(        j8                  t(        j:                  f      r|j6                  }nt%        d| d      |.t(        j1                  |d	      }	|	| j                  |<    |	|      }| j                  d
k(  rQ|j                  j                  }|j#                  d      s|dk(  rt%        d| d| d      j                  |       ||<    | j                  d
k(  r,t(        j=                  d      | _
        | j                        S S c c}w c c}w c c}w c c}w )Nr4   r   r   z	Feature 'zh' has `output_mode='one_hot'`. Thus its preprocessor should return an int64 dtype. Instead it returns a z dtype.z' has `output_mode='one_hot'`. However it isn't a standard feature and the dimensionality of its output space is not known, thus it cannot be one-hot encoded. Try using `output_mode='int'`.	multi_hot)
num_tokensr   rn   rc   z-Cannot concatenate features because feature 'z%' has not been encoded (it has dtype z'). Consider using `output_mode='dict'`.rQ   rR   )r   sortedrv   r   r   r   zipr   getrw   rn   rs   rx   r2   r   r{   r~   
startswithr   r3   r	   r_   rd   vocabulary_sizeCategoryEncodingr   rX   rV   r   ri   Concatenate)r   r   r   	all_namesr   all_featuresoutput_dictfeatures_to_concatrB   encoder	all_specsspecr2   r6   cardinalitys                  r   r   zFeatureSpace._merge_featuresF  s   0006%**,1D- ,22B2G2G2I+JD( --0L0LL 	
 99
 "$'
 150L0LMd#MN
 v%K!#::!$Y!= 7g//33D$?%g.G##v-(/K%&--g67 6)""{{#566
 -1,M,M
$(DMM$
 483O3O
+/D  &

	
 $'y,	#J 4	,D'4MM&&E9,#1155   -]]&&t,  #}}))44U;$#D6 *005wg?   6#7#79L9L"M #/">">"@Kf.E.EF"."9"9Kf.C.CD"."7"7K 6#8#8&.."I #/"7"7K$#D6 *9 9  *$55#.K 6 G 3:D))$/%g.G8+**##E*ex.?$Gv N>>CW E?? 
 #))'2$+D!i4	,l x' ,,",5DK;;122u
 N0

s   0OO#O(3O-c                 b    | j                   s#| j                         sd| _         y t        d      y )NTzUYou need to call `.adapt(dataset)` on the FeatureSpace before you can start using it.)r   r   r   r   s    r   r   zFeatureSpace._check_if_adapted  s6    557#'  5 	  r   c                 l    | j                   s(| j                          | j                          d| _         y y NT)r   r   r   r   s    r   r   zFeatureSpace._check_if_built  s-    zz""$%%'DJ	 r   c                    | j                          t        |t              st        d| dt	        |             |j                         D ci c]  \  }}|t        j                  |       }}}d}|j                         D ]o  \  }}|j                  j                  dk(  rt        j                  |ddg      ||<   d}=|j                  j                  dk(  sWt        j                  |d      ||<   q | j                  |      }| j                  |      }| j                  ||      }	|r| j                  dk(  r+|	j                  d   dk(  sJ t        j                   |	d	      S |	j                         D ]L  \  }}|j                  j                  d
k(  s |j                  d   dk(  s3t        j                   |d	      |	|<   N |	S c c}}w )Nz>A FeatureSpace can only be called with a dict. Received: data=r   Fr   r   TrQ   rn   r      )r   r3   r4   r   r   rq   r   convert_to_tensorr   r   reshaper   r   r   r   r   squeeze)
r   r   r   r   	rebatchedr   r   preprocessed_datacrossed_datamerged_datas
             r   __call__zFeatureSpace.__call__  s   $%""&z$t*? 
 DH::<PZS%R))%00PP	zz| 	3GD!ww||q ZZAq62T
 	"^^Ar2T
	3 !55d;++,=>**+<lK8+"((+q000zz+A66*002 BGD!ww||q(QWWQZ1_,.JJqq,AD)B ) Qs    Gc                     t        j                  | j                        | j                  t        j                  | j                        | j
                  | j                  | j                  dS )N)rs   r   rt   r   ro   rp   )r   r9   rs   r   rt   r   ro   rp   r   s    r   r   zFeatureSpace.get_config  sT    )@@O++(??M --++'+'C'C
 	
r   c                      | di |S r!   r"   r#   s     r   r&   zFeatureSpace.from_config  r'   r   c                     | j                   j                         D ci c]   \  }}||j                  j                         " c}}S c c}}w rA   )rs   rq   r6   get_build_configr   s      r   r   zFeatureSpace.get_build_config  sI     "&!4!4!6
g '&&7799
 	
 
s   %Ac                     |j                         D ]-  }| j                  |   j                  j                  ||          / d| _        y r   )rv   rs   r6   build_from_configr   )r   r%   r   s      r   r   zFeatureSpace.build_from_config  sB    KKM 	MDMM$,,>>vd|L	Mr   c                 0    t        j                  | |       y)a  Save the `FeatureSpace` instance to a `.keras` file.

        You can reload it via `keras.models.load_model()`:

        ```python
        feature_space.save("myfeaturespace.keras")
        reloaded_feature_space = keras.models.load_model("myfeaturespace.keras")
        ```
        N)r   
save_model)r   filepaths     r   savezFeatureSpace.save  s     	dH-r   c                      y rA   r"   r   stores     r   save_own_variableszFeatureSpace.save_own_variables       r   c                      y rA   r"   r   s     r   load_own_variableszFeatureSpace.load_own_variables  r   r   r(   rA   )g      ?g        N)Nr   N)Nr   r   N)r   N)rn   Nr   r   r   )$r)   r*   r+   __doc__r-   r?   rB   r1   rK   rP   rU   rZ   rb   rf   rl   r   ry   rr   r}   r   r   r   r   r   r   r   r   r   r   r   r&   r   r   r   r   r   r"   r   r   r=   r=   Y   s   CJ K K 9 9 	
 	
 
 
 
 
 HL
 
  
 
"  
 
" 
 
 
 
  "E,NHA8J'"H
%
dL<
  
 

.r   r=   )r   tensorflow.compat.v2compatv2r   tf_keras.srcr   tf_keras.src.enginer   tf_keras.src.savingr   r    tf_keras.src.utils.generic_utilsr    tensorflow.python.util.tf_exportr   globalsr	   r   r/   Layerr=   r"   r   r   <module>r      sv    E ! !   * * 1 7 :	Hgi)>	? 8 < (R0j
:## j
 1j
r   