Congratulations, guys.
We succeeded in plotting the results and evaluating the model.
So our model is well trained and ready to export.
So here we're going to save and export our model.
We can now export the trained model to a TensorFlow Savedmodel format which is directory with model
files.
So the model will be saved in a directory.
Linear regression export.
And the name of the model is Savedmodel dot PB.
To export the model we use model dot export function.
And what is the name of our model?
I'll name it as linear regression export and here print model exported for serving linear regression
export okay.
So this is very simple.
We use the export function in order to export our model.
Let's run and here we go.
Save a artifact at linear regression export.
Go to this folder and here we go.
We have the newly created folder.
We have assets, variables, fingerprint and savedmodel.
I'll write those notes here.
The assets folder stores external files needed by the model vocabulary files for NLP models, lookup
tables, custom operators, any external resources.
The model depends on.
If your model uses text processing.
Preprocessing the vocabulary file would be here.
The variable folder stores the trained model weights.
The the first one binary file with weight values and the variables dot index.
Index file mapping variable names to position.
Why split across files?
Large models may be split across multiple data files.
Enables parallel loading and checkpointing.
These files contain your trained parameters.
Weight metrics.
Bias vectors.
Batch normalization parameters and any other trainable variables.
Savedmodel Bebe.
The main model.
The main model architecture and computation graph contains.
Model structure the layers and connections.
Input output specifications.
Computation operations.
Signature definitions.
How to call the model and others.
Fingerprint is the unique identifier for the Savedmodel.
So as a quick recap, we created this model.
We exported this model by using model dot export and we named the name of the folder Linear Regression
export.
We opened the folder the files directory here and we see a folder named linear regression export.
If we click on it we have assets folder stores external files needed by the model.
The variables folder stores the training model weights that saved model the main model architecture
and Computation graph and the fingerprint file unique identifier for the saved model.
As a quick recap model Savedmodel dot PB model architecture variables, folder model parameters, assets,
external resources and model identity is the fingerprint of PB file.
For our example, the savedmodel dot pd file.
Here we have the two that the the relationship the regression.
The variables folder contains the two parameters weight and bias.
The assets folder empty.
We don't need any external resources.
Fingerprint dot PB unique hash for your specific model.
Okay so this is how we export our model.
In the next videos we're going to export the TF Lite which is TensorFlow Lite that is used for Android
Studio.