Skip to content

Commit

Permalink
chore: reformat doc
Browse files Browse the repository at this point in the history
  • Loading branch information
anyangml committed Feb 29, 2024
1 parent 6f458ea commit 24e45ff
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions doc/freeze/freeze.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
# Freeze a model

The trained neural network is extracted from a checkpoint and dumped into a protobuf(.pb) file. This process is called "freezing" a model. The idea and part of our code are from [Morgan](https://blog.metaflow.fr/tensorflow-how-to-freeze-a-model-and-serve-it-with-a-python-api-d4f3596b3adc). To freeze a model, typically one does

::::{tab-set}

:::{tab-item} TensorFlow {{ tensorflow_icon }}

```bash
$ dp freeze -o model.pb
```
or
in the folder where the model is trained. The output model is called `model.pb`.

:::

:::{tab-item} PyTorch {{ pytorch_icon }}

```bash
$ dp --pt freeze -o model.pth
```
in the folder where the model is trained. The output model is called `model.pb` or `model.pth`.
in the folder where the model is trained. The output model is called `model.pth`.

:::

::::

In [multi-task mode](../train/multi-task-training.md):
- This process will in default output several models, each of which contains the common descriptor and
Expand Down

0 comments on commit 24e45ff

Please sign in to comment.