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. To freeze a model, typically one does
$ dp freeze -o graph.pb
in the folder where the model is trained. The output model is called graph.pb
.
In multi-task mode:
- This process will in default output several models, each of which contains the common descriptor and
one of the user-defined fitting nets in {ref}
fitting_net_dict <model/fitting_net_dict>
, let's name itfitting_key
, together frozen ingraph_{fitting_key}.pb
. Those frozen models are exactly the same as single-task output with fitting netfitting_key
. - If you add
--united-model
option in this situation, the total multi-task model will be frozen into one unitgraph.pb
, which is mainly for multi-task initialization and can not be used directly for inference.