Nd4j 运行异常解决方案
使用Nd4j版本
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-native</artifactId>
<version>1.0.0-M1.1</version>
</dependency>
本地开发环境运行正常,但部署到服务器环境运行异常
java.lang.ExceptionInInitializerError
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.<init> (NativeOpExecutioner.java:78)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance (Constructor.java:423)
at java.lang.Class.newInstance (Class.java:442)
at org.nd4j.linalg.factory.Nd4j.initWithBackend (Nd4j.java:5178)
at org.nd4j.linalg.factory.Nd4j.initContext (Nd4j.java:5093)
at org.nd4j.linalg.factory.Nd4j.<clinit> (Nd4j.java:270)
at HelloNd4j.main (HelloNd4j.java:5)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.RuntimeException: ND4J is probably missing dependencies. For more information, please refer to: https://deeplearning4j.konduit.ai/nd4j/backend
at org.nd4j.nativeblas.NativeOpsHolder.<init> (NativeOpsHolder.java:116

本文介绍在本地开发环境中正常运行的Nd4j在服务器部署时遇到的异常,主要表现为 UnsatisfiedLinkError,通过降低Nd4j版本并提供合适的依赖,解决因版本不匹配导致的缺失依赖问题。
最低0.47元/天 解锁文章
1896

被折叠的 条评论
为什么被折叠?



