
    BVhD                        d Z ddlZ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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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g        G d de&             Z' e$ddg       G d de'             Z(d(d Z)d! Z*d" Z+d# Z,d$ Z-	 d(d%Z.d& Z/d' Z0y))z"SavedModel builder implementation.    N)Any)	types_pb2)meta_graph_pb2)saved_model_pb2)	saver_pb2)dtypes)ops)tensor)file_io)	variables)
tf_logging)fingerprinting_utils)path_helpers)signature_def_utils)	constants)metrics)saver)compat)deprecated_args)	tf_exportsave_v1_builderz*__internal__.saved_model.SavedModelBuilder)v1c                   n    e Zd ZdZd ZddZd Zd Zd ZddZ		 	 	 	 	 	 dd	Z
	 	 	 	 	 	 	 dd
Z	 	 ddZy)_SavedModelBuildera  Builds the `SavedModel` protocol buffer and saves variables and assets.

  The `SavedModelBuilder` class provides the functionality to build a
  `SavedModel` protocol buffer. Specifically, this allows multiple meta
  graphs to be saved as part of a single language-neutral `SavedModel`,
  while sharing variables and assets.

  To build a SavedModel, the first meta graph must be saved with variables.
  Subsequent meta graphs will simply be saved with their graph definitions. If
  assets need to be saved and written or copied to disk, they can be provided
  when the meta graph def is added. If multiple meta graph defs are associated
  an asset of the same name, only the first version is retained.

  Each meta graph added to the SavedModel must be annotated with tags. The tags
  provide a means to identify the specific meta graph to load and restore, along
  with the shared set of variables and assets.

  Typical usage for the `SavedModelBuilder`:

  ```python
  ...
  builder = tf.compat.v1.saved_model.Builder(export_dir)

  with tf.compat.v1.Session(graph=tf.Graph()) as sess:
    ...
    builder.add_meta_graph_and_variables(sess,
                                    ["foo-tag"],
                                    signature_def_map=foo_signatures,
                                    assets_list=foo_assets)
  ...

  with tf.compat.v1.Session(graph=tf.Graph()) as sess:
    ...
    builder.add_meta_graph(["bar-tag", "baz-tag"])
  ...

  builder.save()
  ```

  Note: This function will only be available through the v1 compatibility
  library as tf.compat.v1.saved_model.builder.SavedModelBuilder or
  tf.compat.v1.saved_model.Builder. Tensorflow 2.0 will introduce a new
  object-based method of creating SavedModels.
  c                 ^   t        j                         | _        t        j                  | j                  _        || _        t        j                  |      r$t        j                  |      r.t        d| d      t        j                  | j                         d| _        t               | _        y )NzExport directory z already exists, and isn't empty. Please choose a different export directory, or delete all the contents of the specified directory.F)r   
SavedModel_saved_modelr   SAVED_MODEL_SCHEMA_VERSIONsaved_model_schema_version_export_dirr   file_existslist_directoryAssertionErrorrecursive_create_dir_has_saved_variablesset_saved_asset_files)self
export_dirs     Z/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/saved_model/builder_impl.py__init__z_SavedModelBuilder.__init__^   s    '224D,, 	0 "D:&			
	+
| ,3 34 	4
 ""4#3#34 !&D!eD    Nc                     t        j                  t        |      }t        ||      }|st	        j
                  d       yt        || j                  | j                         y)zSaves asset to the meta graph and writes asset files to disk.

    Args:
      meta_graph_def: The meta graph def to which the assets will be added.
      assets_list: The list where the asset paths are setup.
    No assets to write.N)		functoolspartial_add_asset_to_metagraph_maybe_save_assetsr   infocopy_assets_to_destination_dirr    r'   )r(   meta_graph_defassets_listwrite_fnasset_filename_maps        r*   _save_and_write_assetsz)_SavedModelBuilder._save_and_write_assetsu   sW       !8.IH+HkB oo+, ##5t7G7G#'#:#:<r,   c                    |D ]'  }|j                   j                  j                  |       ) |(|D ]#  }|j                  |   j	                  ||          % | j
                  j                  j                         }|j	                  |       y)a  Tags the meta graph def and adds it to the SavedModel.

    Tags the meta graph def with the supplied tags, adds signature defs to it if
    provided and appends the meta graph def to the SavedModel proto.

    Args:
      meta_graph_def: The meta graph def to add to the SavedModel.
      tags: The set of tags to annotate the meta graph def with.
      signature_def_map: The map of signature defs to be added to the meta graph
        def.
    N)meta_info_deftagsappendsignature_defCopyFromr   meta_graphsadd)r(   r5   r<   signature_def_maptagkeyproto_meta_graph_defs          r*   _tag_and_add_meta_graphz*_SavedModelBuilder._tag_and_add_meta_graph   s      4""''..s34 $" K#$$S)223DS3IJK  ,,88<<>!!.1r,   c                 8   |t        d      |j                  d      t        d| d      |j                  d      dk(  r-|j                  j                  D ]  }| j	                  |        y|j
                  t        j                  k(  rt        d| d      y)ak  Validates the `TensorInfo` proto.

    Checks if the `encoding` (`name` or `coo_sparse` or `type_spec`) and
    `dtype` fields exist and are non-empty.

    Args:
      tensor_info: `TensorInfo` protocol buffer to validate.

    Raises:
      AssertionError: If the `encoding` or `dtype` fields of the supplied
          `TensorInfo` proto are not populated.
    NzXAll TensorInfo protos used in the SignatureDefs must have the name and dtype fields set.encodingzInvalid `tensor_info`: zx. All TensorInfo protos used in the SignatureDefs must have one of the 'encoding' fields (e.g., name or coo_sparse) set.composite_tensorzP. All TensorInfo protos used in the SignatureDefs must have the dtype field set.)r#   
WhichOneofrI   
components_validate_tensor_infodtyper   
DT_INVALID)r(   tensor_info	components      r*   rL   z(_SavedModelBuilder._validate_tensor_info   s     "# # j)1#K= 1% %& & j)-??"33>> .)""9-.			i22	2#K= 1> >? ? 
3r,   c                 t   |D ]U  }||   }|j                   }|j                  }|D ]  }| j                  ||           |D ]  }| j                  ||           W t        j                  |v rt        dt        j                   d      t        j                  |v rt        dt        j                   d      y)aE  Validates the `SignatureDef` entries in the signature def map.

    Validation of entries in the signature def map includes ensuring that the
    `name` and `dtype` fields of the TensorInfo protos of the `inputs` and
    `outputs` of each `SignatureDef` are populated. Also ensures that reserved
    SignatureDef keys for the initialization and train ops are not used.

    Args:
      signature_def_map: The map of signature defs to be validated.

    Raises:
      AssertionError: If a TensorInfo is not valid.
      KeyError: If a reserved signature key is used in the map.
    zSignatureDef map key "z=" is reserved for initialization. Please use a different key.z;" is reserved for the train op. Please use a different key.N)inputsoutputsrL   r   INIT_OP_SIGNATURE_KEYKeyErrorTRAIN_OP_SIGNATURE_KEY)r(   rB   signature_def_keyr>   rR   rS   
inputs_keyoutputs_keys           r*   _validate_signature_def_mapz._SavedModelBuilder._validate_signature_def_map   s     / 9'(9:m##f%%g 7*""6*#567  9+""7;#7899 &&*;;#I$C$C#D EE EF F ''+<<#I$D$D#E FC DE E =r,   c                     |sCt        j                  t        j                         dt        j
                  j                  d      }|S )z6Creates a sharded saver if one does not already exist.T)shardedwrite_versionallow_empty)tf_saverSaverr   _all_saveable_objectsr   SaverDefV2)r(   r   s     r*   _maybe_create_saverz&_SavedModelBuilder._maybe_create_saver   s=     nn

)
)
+!**--	e
 Lr,   c                 ^   | j                   st        d      |xs i }| j                  |       t        ||t        j
                         t        ||t        j                         | j                  |      }|j                  |d      }| j                  ||       | j                  |||       y)a  Adds the current meta graph to the SavedModel.

    Creates a Saver in the current scope and uses the Saver to export the meta
    graph def. Invoking this API requires the `add_meta_graph_and_variables()`
    API to have been invoked before.

    Args:
      tags: The set of tags to annotate the meta graph def with.
      signature_def_map: The map of signature defs to be added to the meta graph
        def.
      assets_list: Assets to be saved with SavedModel. Note
          that this list should be a subset of the assets saved as part of
          the first meta graph in the SavedModel.
      clear_devices: Set to true if the device info on the default graph should
        be cleared.
      init_op: Op or group of ops to execute when the graph is loaded. Note
          that when the init_op is specified it is run after the restore op at
        load-time.
      train_op: Op or group of opts that trains the model when run. This will
        not be run automatically when the graph is loaded, instead saved in
        a SignatureDef accessible through the exported MetaGraph.
      saver: An instance of tf.compat.v1.train.Saver that will be used to export
        the metagraph. If None, a sharded Saver that restores all variables will
        be used.

    Raises:
      AssertionError: If the variables for the SavedModel have not been saved
          yet, or if the graph already contains one or more legacy init ops.
    xGraph state including variables and assets has not been saved yet. Please invoke `add_meta_graph_and_variables()` first.Tclear_devicesstrip_default_attrsN)r%   r#   rZ   _add_op_to_signature_def_mapr   rT   rV   rd   export_meta_graphr9   rF   )	r(   r<   rB   r6   rh   init_optrain_opr   r5   s	            r*   add_meta_graphz!_SavedModelBuilder.add_meta_graph   s    J $$BC C */R$$%67 !!2G!*!@!@B !2H!*!A!AC $$U+E ,,# - ?N 	< 	  7HIr,   c
                    | j                   rt        d      |xs i }| j                  |       t        ||t        j
                         t        ||t        j                         t        j                  | j                         t        j                  | j                        }
| j                  |	      }	|	j                  ||
dd       |	j                  ||      }| j                  ||       | j                  |||       d| _         y)a   Adds the current meta graph to the SavedModel and saves variables.

    Creates a Saver to save the variables from the provided session. Exports the
    corresponding meta graph def. This function assumes that the variables to be
    saved have been initialized. For a given `SavedModelBuilder`, this API must
    be called exactly once and for the first meta graph to save. For subsequent
    meta graph defs to be added, the `add_meta_graph()` API must be used.

    Args:
      sess: The TensorFlow session from which to save the meta graph and
        variables.
      tags: The set of tags with which to save the meta graph.
      signature_def_map: The map of signature def map to add to the meta graph
        def.
      assets_list: Assets to be saved with SavedModel.
      clear_devices: Set to true if the device info on the default graph should
        be cleared.
      init_op: Op or group of ops to execute when the graph is loaded. Note
          that when the init_op is specified it is run after the restore op at
        load-time.
      train_op: Op or group of ops that trains the model when run. This will
        not be run automatically when the graph is loaded, instead saved in
        a SignatureDef accessible through the exported MetaGraph.
      strip_default_attrs: Boolean. If `True`, default-valued attributes will be
        removed from the NodeDefs. For a detailed guide, see
        [Stripping Default-Valued Attributes](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/saved_model/README.md#stripping-default-valued-attributes).
      saver: An instance of tf.compat.v1.train.Saver that will be used to export the
        metagraph and save variables. If None, a sharded Saver that restores
        all variables will be used.

    lGraph state including variables and assets has already been saved. Please invoke `add_meta_graph()` instead.Fwrite_meta_graphwrite_staterg   TN)r%   r#   rZ   rj   r   rT   rV   r   get_or_create_variables_dirr    get_variables_pathrd   saverk   r9   rF   )r(   sessr<   rB   r6   rh   rl   rm   ri   r   variables_pathr5   s               r*   add_meta_graph_and_variablesz/_SavedModelBuilder.add_meta_graph_and_variables2  s   V    9 : : */R$$%67 !!2G!*!@!@B !2H!*!A!AC ,,T-=-=>!44T5E5EFN$$U+E 
JJt^eJO ,,#9L - NN 	< 	  7HI !%Dr,   c                 v   t        j                  t               t        j                  | j
                        st        j                  | j
                         |rt        j                  t        j                  | j
                        t        j                  t        j                              }t        j                  |t        | j                               n!|rt        j                  | j
                  t        j                        }t!               j#                  dt%               j#                  d            	 t'        d      t(        j+                  | j                        j-                  ||      }nt        j                  t        j                  | j
                        t        j                  t        j.                              }t        j                  || j                  j1                  d             t3        j4                  dt        j6                  |             t        j8                  d       |S )aw  Writes a `SavedModel` protocol buffer to disk.

    The function writes the SavedModel protocol buffer to the export directory
    in a serialized format.

    Args:
      as_text: Writes the SavedModel protocol buffer in text format to disk.
        Protocol buffers in text format are useful for debugging, but parsing
        fails when it encounters an unknown field and so is not forward
        compatible. This means changes to TensorFlow may prevent deployment of
        new text format SavedModels to existing serving binaries. Do not deploy
        `as_text` SavedModels to production.
      experimental_image_format: Writes the SavedModel protobuf in the
        experimental image format. See
      https://www.tensorflow.org/api_docs/python/tf/saved_model/SaveOptions for
        more details. This allows `SavedModelBuilder` to save models larger than
        2 GiB.
      experimental_image_writer_options: Optional options for the experimental
        image writer. See
        https://github.com/google/riegeli/blob/master/doc/record_writer_options.md
          for available options.

    Raises:
       RuntimeError: When trying to use `proto_splitter` but `proto_splitter` is
         not imported. This check is here because `proto_splitter` is not
         available in OSS at the moment.

    Returns:
      The path to which the SavedModel protocol buffer was written.
    proto_splitterzDNo proto_splitter is provided, cannot use experimental_image_format.T)deterministiczSavedModel written to: %s1)r]   )r   IncrementWriteApi_SAVE_BUILDER_LABELr   r!   r    r$   joinr   as_bytesr   SAVED_MODEL_FILENAME_PBTXTwrite_string_to_filestrr   SAVED_MODEL_FILENAME_PREFIXlocalsgetglobalsRuntimeErrorr{   SavedModelSplitterwriteSAVED_MODEL_FILENAME_PBSerializeToStringr   r3   as_textIncrementWrite)r(   r   experimental_image_format!experimental_image_writer_optionspaths        r*   rv   z_SavedModelBuilder.save  s   @ 12t//0""4#3#34\\
//$**
+
//)>>
?Ad ""4T->->)?@	"||11

 HLL)79==9I+JK ,  001B1BCII3
 ||OOD,,-OOI==>
 	$$$##55D5I	
 OO/1EF-Kr,   N)NNFNNN)NNFNNFN)FFN)__name__
__module____qualname____doc__r+   r9   rF   rL   rZ   rd   rn   ry   rv    r,   r*   r   r   /   sq    +Z$.<(2,?>E@
 (,!%#(!"FJV 6:/316+/,07<)-[%z ;@-1Hr,   r   zsaved_model.Builderz%saved_model.builder.SavedModelBuilderc                   |    e Zd Zej                  j                  dd      Z fdZd ZddZd Z	d Z
 edd	d
      	 	 	 	 	 	 	 dd       Z edd	d
      	 	 	 	 	 	 	 dd       Zej                  j                  j                  dd      e_        ej                  j                  j                  dd      e_         xZS )SavedModelBuilderr6   assets_collectionc                 .    t         t        |   |       y )N)r)   )superr   r+   )r(   r)   	__class__s     r*   r+   zSavedModelBuilder.__init__  s    	
T+z+Br,   c                 j    | j                  |       | j                  |       | j                  |       y)z)Add asset and op collections to be saved.N)r9   _maybe_add_main_op_add_train_op)r(   r   main_oprm   s       r*   _add_collectionsz"SavedModelBuilder._add_collections  s/     	 12G$x r,   Nc                     t        t        |      }|st        j                  d       yt	        || j
                  | j                         y)zSaves asset to the meta graph and writes asset files to disk.

    Args:
      assets_collection_to_add: The collection where the asset paths are setup.
    r.   N)r2   _add_asset_to_collectionr   r3   r4   r    r'   )r(   assets_collection_to_addr8   s      r*   r9   z(SavedModelBuilder._save_and_write_assets  sI     ,,D,DF oo+, ##5t7G7G#'#:#:<r,   c                 N   |yt        |t        j                        st        d| dt	        |       d      t
        j                  t
        j                  fD ]&  }t        j                  |      st        d| d       t        j                  t
        j                  |       y)a;  Adds main op to the SavedModel.

    Args:
      main_op: Main op to run as part of graph initialization. If None, no main
        op will be added to the graph.

    Raises:
      TypeError: If the main op is provided but is not of type `Operation`.
      ValueError: if the Graph already contains an init op.
    Nz	Expected z! to be an Operation but got type 	 instead.zAGraph already contains one or more main ops under the collection .)
isinstancer	   	Operation	TypeErrortyper   MAIN_OP_KEYLEGACY_INIT_OP_KEYget_collection
ValueErroradd_to_collection)r(   r   init_op_keys      r*   r   z$SavedModelBuilder._maybe_add_main_op  s     gs}}-	'*Kgy2 3 3
 "--y/K/KL *			K	(%a)* 	** )//9r,   c                     |ht        |t        j                        s)t        |t        j                        st        d| d      t        j                  t        j                  |       yy)a`  Add train op to the SavedModel.

    Note that this functionality is in development, and liable to be
    moved elsewhere.

    Args:
      train_op: Op or group of ops that are used for training. These are stored
        as a collection with key TRAIN_OP_KEY, but not executed.

    Raises:
      TypeError if Train op is not of type `Operation`.
    Nz`train_op` z needs to be a Tensor or Op.)	r   r
   Tensorr	   r   r   r   r   TRAIN_OP_KEY)r(   rm   s     r*   r   zSavedModelBuilder._add_train_op  sV     6==13==1+hZ/KLMM	I22H=	 r,   z9Pass your op to the equivalent parameter main_op instead.legacy_init_opc	                     | j                   st        d      |xs i }| j                  |       ||n|}| j                  ||d        | j	                  |      }|j                  ||      }	| j                  |	||       y )Nrf   rg   )r%   r#   rZ   r   rd   rk   rF   )
r(   r<   rB   r   r   rh   r   ri   r   r5   s
             r*   rn   z SavedModelBuilder.add_meta_graph.  s     $$BC C */R$$%67 !,g.G 	+Wd;$$U+E ,,#9L - NN 	  7HIr,   c
                    | j                   rt        d      |xs i }| j                  |       |xs |}| j                  ||d        t	        j
                  | j                         t	        j                  | j                        }
| j                  |	      }	|	j                  ||
dd       |	j                  ||      }| j                  |||       d| _         y )Nrp   Frq   rg   T)r%   r#   rZ   r   r   rt   r    ru   rd   rv   rk   rF   )r(   rw   r<   rB   r   r   rh   r   ri   r   rx   r5   s               r*   ry   z.SavedModelBuilder.add_meta_graph_and_variablesZ  s        9 : : */R$$%67 'G 	+Wd;,,T-=-=>!44T5E5EFN$$U+E 
JJt^eJO ,,#9L - NN 	  7HI !%Dr,   r   )NNNFNFN)r   r   r   r   r   replacer+   r   r9   r   r   r   rn   ry   __classcell__)r   s   @r*   r   r     s   &&..}/BD'C!<(:8>& 4N#%
 (,'+$(#(!).'J%'JR 4N#% 6:592616+/7<)-7%%7%r .<<DDLL(*. 55==EE
,. &&r,   r   c                     i }|t        j                  d       |S |D ]8  }t        |      }|st        d| d      t	        ||      } | ||       |||<   : t        j                  d       |S )aM  Saves assets to the meta graph.

  Args:
    write_fn: A function callback that writes assets into meta graph.
    assets_to_add: The list where the asset paths are setup.

  Returns:
    A dict of asset basenames for saving to the original full path to the asset.

  Raises:
    ValueError: Indicating an invalid filepath tensor.
  zNo assets to save.zAsset filepath tensor z in is invalid.zAssets added to graph.)r   r3   _asset_path_from_tensorr   get_asset_filename_to_add)r7   assets_to_addr8   asset_tensorasset_source_filepathasset_filenames         r*   r2   r2     s     OO() $ ?l3LA /~_MNN.13N ^\* *?~&%?( //*+	r,   c                     t         j                  j                  |       }||vr|S ||   }|| k(  r|S t        j                  | |      st        ||      S |S )a  Get a unique basename to add to the SavedModel if this file is unseen.

  Assets come from users as full paths, and we save them out to the
  SavedModel as basenames. In some cases, the basenames collide. Here,
  we dedupe asset basenames by first checking if the file is the same,
  and, if different, generate and return an index-suffixed basename
  that can be used to add the asset to the SavedModel.

  Args:
    asset_filepath: the full path to the asset that is being saved
    asset_filename_map: a dict of filenames used for saving the asset in
      the SavedModel to full paths from which the filenames were derived.

  Returns:
    Uniquified filename string if the file is not a duplicate, or the original
    filename if the file has already been seen and saved.
  )osr   basenamer   filecmp_get_unique_asset_filename)asset_filepathr8   r   other_asset_filepaths       r*   r   r     si    $ 77##N3.--+N;^+  
)=	>%n6HII 
r,   c                     d}| }||v r_t        j                  d      j                  t        j                  |       t        j                  t        |            g      }|dz  }||v r_|S )N   _)r   r   r   r   )r   r8   iunique_filenames       r*   r   r     si    !"/--ooc*//		(&//#a&*ABDOFA 	-- 
r,   c                    t        | t        j                        st        d|  d      | j                  j
                  dk7  r&t        d|  d| j                  j
                   d      | j                  t        j                  k7  rt        d|  d| j                   d      | j                  j                  d      j                  }t        |      dk7  rt        d|  d	      |d
   S )a  Returns the filepath value stored in constant `path_tensor`.

  Args:
    path_tensor: Tensor of a file-path.

  Returns:
    The string value i.e. path of the tensor, if valid.

  Raises:
    TypeError if tensor does not match expected op type, dtype or value.
  zAsset path tensor z must be a Tensor.Constz# must be of type constant.Has type r   z#` must be of dtype string.Has type valuer   z must be a scalar.r   )r   r
   r   r   opr   rM   r   stringget_attr
string_vallen)path_tensor
str_valuess     r*   r   r     s     
K	/
(5GH
II^^G#
( 6  + 3 34I? @ @&--'
( 6  + 1 12)= > >~~&&w/::*_
(5GH
II	Ar,   c                 |    | j                   j                         }||_        |j                  |j                  _        y)a&  Builds an asset proto and adds it to the meta graph def.

  Args:
    meta_graph_def: The meta graph def to which the asset will be added.
    asset_filename: The filename of the asset to be added.
    asset_tensor: The asset tensor used to populate the tensor info of the asset
      proto.
  N)asset_file_defrA   filenamenamerO   )r5   r   r   asset_protos       r*   r1   r1     s4     --113+'+!-!2!2+r,   c                    |
t               }t        j                  |      }| j                         D ]  \  }}t	        j
                  t        j                  |      t        j                  |            }t	        j                  |      sX||k7  s^||vsct	        j                  ||d       |j                  |        t        j                  dt        j                  |             y)a  Copy all assets from source path to destination path.

  Args:
    asset_filename_map: a dict of filenames used for saving the asset in
      the SavedModel to full paths from which the filenames were derived.
    destination_dir: the destination directory that assets are stored in.
    saved_files: a set of destination filepaths that have already been copied
      and will be skipped
  NT)	overwritezAssets written to: %s)r&   r   get_or_create_assets_diritemsr   r   r   r   r!   copyrA   r   r3   r   )r8   destination_dirsaved_filesassets_destination_dirasset_basenamer   asset_destination_filepaths          r*   r4   r4   $  s     %K'@@ 0B/G/G/I 2+n+!(./'") 	12!;;"+5ll
!;tMoo012 //)..!78:r,   c                     t        j                         }| |_        |j                  |j                  _        t               }|j                  |       t        j                  t        j                  |       y)zBuilds an asset proto and adds it to the asset collection of the graph.

  Args:
    asset_filename: The filename of the asset to be added.
    asset_tensor: The asset tensor used to populate the tensor info of the
        asset proto.
  N)r   AssetFileDefr   r   rO   r   Packr	   r   r   
ASSETS_KEY)r   r   r   asset_any_protos       r*   r   r   H  sY     ++-+'+!-!2!2+E/{#	,,o>r,   c                 <    |t        j                  ||      | |<   y y r   )r   op_signature_def)rB   r   rD   s      r*   rj   rj   Y  s$    ^0AA"cJc r,   r   )1r   r/   r   google.protobuf.any_pb2r   tensorflow.core.frameworkr   tensorflow.core.protobufr   r   r   tensorflow.python.frameworkr   r	   r
   tensorflow.python.lib.ior   tensorflow.python.opsr   tensorflow.python.platformr   tensorflow.python.saved_modelr   r   r   0tensorflow.python.saved_model.pywrap_saved_modelr   r   tensorflow.python.trainingr   r_   tensorflow.python.utilr   "tensorflow.python.util.deprecationr    tensorflow.python.util.tf_exportr   r   objectr   r   r2   r   r   r   r1   r4   r   rj   r   r,   r*   <module>r      s    )  	 ' / 3 4 . . + . , + 1 > 6 = F D 8 ) > 6 ( 
 7B?g g @gT $&MNO.* . P.D+\$N43 04!:H?"Kr,   