我试图通过 gradle 建立一个 deeplearning4j 项目,但我得到一个 UnsatisfiedLinkError:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopenblas in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:976)
at org.bytedeco.javacpp.Loader.load(Loader.java:777)
at org.bytedeco.javacpp.Loader.load(Loader.java:684)
at org.bytedeco.javacpp.openblas.<clinit>(openblas.java:10)
at org.nd4j.linalg.cpu.nativecpu.blas.CpuBlas.setMaxThreads(CpuBlas.java:117)
at org.nd4j.nativeblas.Nd4jBlas.<init>(Nd4jBlas.java:35)
at org.nd4j.linalg.cpu.nativecpu.blas.CpuBlas.<init>(CpuBlas.java:12)
at org.nd4j.linalg.cpu.nativecpu.CpuNDArrayFactory.createBlas(CpuNDArrayFactory.java:89)
at org.nd4j.linalg.factory.BaseNDArrayFactory.blas(BaseNDArrayFactory.java:67)
at org.nd4j.linalg.cpu.nativecpu.ops.NativeOpExecutioner.getEnvironmentInformation(NativeOpExecutioner.java:1176)
at org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner.printEnvironmentInformation(DefaultOpExecutioner.java:562)
at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:6210)
at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:6087)
at org.nd4j.linalg.factory.Nd4j.<clinit>(Nd4j.java:201)
at org.deeplearning4j.nn.conf.NeuralNetConfiguration$Builder.seed(NeuralNetConfiguration.java:777)
at my.project.NeuralNetwork.main(NeuralNetwork.java:43)
Caused by: java.lang.UnsatisfiedLinkError: no openblas in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:976)
at org.bytedeco.javacpp.Loader.load(Loader.java:765)
... 14 more
我的依赖项如下所示:
dependencies {
compile group: 'org.deeplearning4j', name: 'deeplearning4j-core', version: '0.9.1'
compile group: 'org.deeplearning4j', name: 'rl4j', version: '0.9.1'
compile group: 'org.nd4j', name: 'nd4j-native', version: '0.9.1'
compile group: 'org.nd4j', name: 'nd4j-jblas', version: '0.9.1'
compile group: 'org.nd4j', name: 'nd4j-api', version: '0.9.1'
compile 'org.nd4j:nd4j-native:0.9.1:windows-x86_64'
}
我也尝试添加
compile group: 'org.bytedeco.javacpp-presets', name: 'openblas', version: '0.2.20-1.3'
但这没有帮助。
我需要安装 OpenBlas 吗?我没有在deeplearning4j 的快速入门指南中读到这样的内容。操作系统为 Win10,IDE 为 IntelliJ 社区版。