Unload ONNX Model
Unload the specified ONNX model, terminate related processes and release system resources.
API Description
API Type
unloadOnnxModelParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| onnxid | string | Yes | Model ID returned by loadOnnxModel |
Return Value
No return value (void)
Basic Usage
javascript
// Load model first
const onnxid = await apiInvoke('loadOnnxModel', {
file: 'C:\\models\\yolov8s.onnx'
});
// Use model for inference...
...
// Unload model after use
await apiInvoke('unloadOnnxModel', {
onnxid: onnxid
});
console.log('Model unloaded');