Closed Songbo729066989 closed 2 years ago
version 0.16.0
Can you share you build.gradle
or pom.xml
file?
Looks like you have a conflict version JNA in your classpath
Thanks for your timely reply, it was caused by jna version conflict. I fixed it by force a jna version.
ai.djl.engine.EngineException: Failed to load PyTorch native library at ai.djl.pytorch.engine.PtEngine.newInstance(PtEngine.java:82) at ai.djl.pytorch.engine.PtEngineProvider.getEngine(PtEngineProvider.java:40) at ai.djl.engine.Engine.getEngine(Engine.java:181) at ai.djl.Model.newInstance(Model.java:99) at ai.djl.repository.zoo.BaseModelLoader.createModel(BaseModelLoader.java:189) at ai.djl.repository.zoo.BaseModelLoader.loadModel(BaseModelLoader.java:152) at ai.djl.repository.zoo.Criteria.loadModel(Criteria.java:168)
Caused by: java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;)Lcom/sun/jna/Library; at ai.djl.util.cuda.CudaUtils.loadLibrary(CudaUtils.java:185) at ai.djl.util.cuda.CudaUtils.(CudaUtils.java:33)
at ai.djl.util.Platform.fromSystem(Platform.java:188)
at ai.djl.util.Platform.fromSystem(Platform.java:148)
at ai.djl.util.Platform.detectPlatform(Platform.java:68)
at ai.djl.pytorch.jni.LibUtils.findNativeLibrary(LibUtils.java:270)
at ai.djl.pytorch.jni.LibUtils.getLibTorch(LibUtils.java:87)
at ai.djl.pytorch.jni.LibUtils.loadLibrary(LibUtils.java:75)
at ai.djl.pytorch.engine.PtEngine.newInstance(PtEngine.java:53)
... 45 more