dlpy.embedding_model.EmbeddingModel.deploy_embedding_model¶
-
EmbeddingModel.
deploy_embedding_model
(path, output_format='astore', model_type='branch')¶ Deploy the deep learning model to a data file
- Parameters
- pathstring
Specifies the location to store the model files. If the output_format is set to castable, then the location has to be on the server-side. Otherwise, the location has to be on the client-side.
- output_formatstring, optional
Specifies the format of the deployed model. When astore is specified, the learned embedding features will be output as well. Valid Values: astore, castable, or onnx Default: astore
- model_typestring, optional
Specifies how to deploy the embedding model. “branch” means only one branch model is deployed to extract features while “full” means the full model is deployed to extract features for all branches and compute the distance metric values for all input data pairs. Valid values: branch and full Default: branch
- Returns
Model
for a branch model when model_type is ‘branch’
Notes
Currently, this function supports sashdat, astore, and onnx formats.
More information about ONNX can be found at: https://onnx.ai/
DLPy supports ONNX version >= 1.3.0, and Opset version 8.
For ONNX format, currently supported layers are convo, pool, fc, batchnorm, residual, concat, reshape, and detection.
If dropout is specified in the model, train the model using inverted dropout, which can be specified in
Optimizer
. This will ensure the results are correct when running the model during test phase.