module testing.template_dl_torch
¶
Short summary¶
module lightmlrestapi.testing.template_dl_torch
Template application for a machine learning model based on torch available through a REST API.
Functions¶
function |
truncated documentation |
---|---|
Loads the model. The model name is relative to this file. When call by a REST API, the default value is always used. … |
|
Computes the prediction for model clf. |
|
Displays a version. |
Documentation¶
Template application for a machine learning model based on torch available through a REST API.
- lightmlrestapi.testing.template_dl_torch.restapi_load(files={'model': 'dlmodel.torch'})¶
Loads the model. The model name is relative to this file. When call by a REST API, the default value is always used.
- lightmlrestapi.testing.template_dl_torch.restapi_predict(model, X)¶
Computes the prediction for model clf.
- Parameters:
model – pipeline following scikit-learn API
X – image as a numpy array
- Returns:
output of predict_proba
- lightmlrestapi.testing.template_dl_torch.restapi_version()¶
Displays a version.