WEBVTT

00:00.160 --> 00:02.080
Congratulations, guys.

00:02.080 --> 00:07.080
We succeeded in plotting the results and evaluating the model.

00:07.080 --> 00:11.960
So our model is well trained and ready to export.

00:11.960 --> 00:17.320
So here we're going to save and export our model.

00:17.360 --> 00:25.680
We can now export the trained model to a TensorFlow Savedmodel format which is directory with model

00:25.680 --> 00:26.280
files.

00:26.560 --> 00:30.080
So the model will be saved in a directory.

00:30.120 --> 00:33.240
Linear regression export.

00:33.240 --> 00:37.160
And the name of the model is Savedmodel dot PB.

00:37.360 --> 00:42.760
To export the model we use model dot export function.

00:42.760 --> 00:46.280
And what is the name of our model?

00:46.280 --> 00:56.280
I'll name it as linear regression export and here print model exported for serving linear regression

00:56.320 --> 00:57.800
export okay.

00:58.160 --> 01:00.280
So this is very simple.

01:00.400 --> 01:06.160
We use the export function in order to export our model.

01:06.160 --> 01:08.040
Let's run and here we go.

01:08.280 --> 01:12.200
Save a artifact at linear regression export.

01:12.380 --> 01:15.220
Go to this folder and here we go.

01:15.420 --> 01:18.780
We have the newly created folder.

01:18.780 --> 01:24.180
We have assets, variables, fingerprint and savedmodel.

01:25.140 --> 01:27.500
I'll write those notes here.

01:27.740 --> 01:37.020
The assets folder stores external files needed by the model vocabulary files for NLP models, lookup

01:37.060 --> 01:40.620
tables, custom operators, any external resources.

01:40.620 --> 01:42.460
The model depends on.

01:42.580 --> 01:45.460
If your model uses text processing.

01:45.580 --> 01:49.700
Preprocessing the vocabulary file would be here.

01:49.900 --> 01:55.460
The variable folder stores the trained model weights.

01:55.660 --> 02:03.820
The the first one binary file with weight values and the variables dot index.

02:03.820 --> 02:07.220
Index file mapping variable names to position.

02:07.220 --> 02:09.060
Why split across files?

02:09.060 --> 02:14.340
Large models may be split across multiple data files.

02:14.580 --> 02:18.140
Enables parallel loading and checkpointing.

02:18.380 --> 02:21.540
These files contain your trained parameters.

02:21.540 --> 02:22.700
Weight metrics.

02:22.700 --> 02:24.060
Bias vectors.

02:24.330 --> 02:30.170
Batch normalization parameters and any other trainable variables.

02:30.290 --> 02:32.650
Savedmodel Bebe.

02:33.010 --> 02:34.730
The main model.

02:34.770 --> 02:40.050
The main model architecture and computation graph contains.

02:40.050 --> 02:43.010
Model structure the layers and connections.

02:43.130 --> 02:45.290
Input output specifications.

02:45.330 --> 02:47.690
Computation operations.

02:47.730 --> 02:49.130
Signature definitions.

02:49.130 --> 02:51.290
How to call the model and others.

02:51.370 --> 02:57.730
Fingerprint is the unique identifier for the Savedmodel.

02:57.730 --> 03:02.930
So as a quick recap, we created this model.

03:02.930 --> 03:09.450
We exported this model by using model dot export and we named the name of the folder Linear Regression

03:09.450 --> 03:10.170
export.

03:10.290 --> 03:18.170
We opened the folder the files directory here and we see a folder named linear regression export.

03:18.170 --> 03:25.770
If we click on it we have assets folder stores external files needed by the model.

03:26.090 --> 03:35.210
The variables folder stores the training model weights that saved model the main model architecture

03:35.210 --> 03:42.270
and Computation graph and the fingerprint file unique identifier for the saved model.

03:42.310 --> 03:52.190
As a quick recap model Savedmodel dot PB model architecture variables, folder model parameters, assets,

03:52.470 --> 03:59.190
external resources and model identity is the fingerprint of PB file.

03:59.230 --> 04:05.390
For our example, the savedmodel dot pd file.

04:05.590 --> 04:12.110
Here we have the two that the the relationship the regression.

04:12.150 --> 04:18.470
The variables folder contains the two parameters weight and bias.

04:18.670 --> 04:21.190
The assets folder empty.

04:21.230 --> 04:25.310
We don't need any external resources.

04:25.710 --> 04:30.870
Fingerprint dot PB unique hash for your specific model.

04:30.910 --> 04:34.430
Okay so this is how we export our model.

04:34.430 --> 04:44.350
In the next videos we're going to export the TF Lite which is TensorFlow Lite that is used for Android

04:44.350 --> 04:44.950
Studio.
