Skip to content
This repository was archived by the owner on Nov 24, 2024. It is now read-only.

Commit a9b01f0

Browse files
committed
fix(djl): register onnxengine manually
1 parent c6dd5cb commit a9b01f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/ltd/guimc/dlm/DLModel.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import ai.djl.modality.cv.Image;
99
import ai.djl.modality.cv.ImageFactory;
1010
import ai.djl.modality.cv.translator.ImageClassificationTranslator;
11+
import ai.djl.onnxruntime.engine.OrtEngineProvider;
1112
import ai.djl.translate.TranslateException;
1213
import ai.djl.translate.Translator;
1314

@@ -23,6 +24,7 @@ public class DLModel {
2324
private static boolean inited = false;
2425

2526
public static void init() {
27+
Engine.registerEngine(new OrtEngineProvider());
2628
System.out.println("Available engines: " + Engine.getAllEngines());
2729
try {
2830
// 从资源文件中获取模型

0 commit comments

Comments
 (0)