A SavedModel is a folder, not a single file. saved_model.pb describes
the computation; the trained weights and any extra files sit beside it. Only
saved_model.pb is this format; the other files have formats of their
own.
What the folder holds
/saved_model.pb the SavedModel message: meta graphs, signatures and functionsfile/variables/variables.indexandvariables.data-00000-of-00001(one or more data shards): the values of the variables, in the layout of a TensorFlow checkpointfolder/assets/ extra files the graph reads, such as vocabularies; each is named by an AssetFileDeffolder/fingerprint.pb hashes that identify the model, written by newer versions of TensorFlowfile
The SaverDef of each meta
graph names the ops that restore the variables from variables/.
saved_model.pbtxt
The same SavedModel message may be saved in Protocol Buffers
text format as
saved_model.pbtxt instead. It is printable text, so the explorer does not
read it as this format.
A Git LFS pointer in place of the file
Models kept in Git repositories often store large files with Git LFS. When such a
repository is cloned without fetching the LFS files, saved_model.pb is
not the model but a short text file that begins:
version https://git-lfs.github.com/spec/v1
oid sha256:…
size …
The explorer turns such a file down, because it is printable text. Fetch the LFS
files (git lfs pull) to get the real model.
History
TensorFlow was released as open source in November 2015, with GraphDef already in
place. The release notes of TensorFlow 1.0.0 say “saved_model is available as
tf.saved_model”; 1.1.0 let Java load SavedModels, and 1.2.0 added the
saved_model_cli tool. TensorFlow 2, released in 2019, made SavedModel the
standard way to save a whole model. saved_model_schema_version has been 1
throughout.