0

这个周末我第一次开始使用 Deeplearning4j。我查看了https://deeplearning4j.org/docs/latest/deeplearning4j-quickstart的页面,看到了“没有 Maven 的 Eclipse 设置”的选项。由于我习惯使用 Eclipse 并且以前从未听说过 Maven,因此我决定按照这些说明进行操作。

设置完成后,我在 YouTube 上找到了一个教程,但是当我运行该项目时,我收到此错误:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniopenblas in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:945)
at org.bytedeco.javacpp.Loader.load(Loader.java:750)
at org.bytedeco.javacpp.Loader.load(Loader.java:657)
at org.bytedeco.javacpp.openblas.<clinit>(openblas.java:10)
at org.nd4j.linalg.cpu.nativecpu.blas.CpuBlas.setMaxThreads(CpuBlas.java:87)
at org.nd4j.nativeblas.Nd4jBlas.<init>(Nd4jBlas.java:36)
at org.nd4j.linalg.cpu.nativecpu.blas.CpuBlas.<init>(CpuBlas.java:11)
at org.nd4j.linalg.cpu.nativecpu.CpuNDArrayFactory.createBlas(CpuNDArrayFactory.java:79)
at org.nd4j.linalg.factory.BaseNDArrayFactory.blas(BaseNDArrayFactory.java:71)
at org.nd4j.linalg.cpu.nativecpu.blas.CpuLevel3.<init>(CpuLevel3.java:26)
at org.nd4j.linalg.cpu.nativecpu.CpuNDArrayFactory.createLevel3(CpuNDArrayFactory.java:94)
at org.nd4j.linalg.factory.BaseNDArrayFactory.level3(BaseNDArrayFactory.java:92)
at org.nd4j.linalg.factory.BaseBlasWrapper.level3(BaseBlasWrapper.java:42)
at org.nd4j.linalg.api.ndarray.BaseNDArray.mmuli(BaseNDArray.java:2849)
at org.nd4j.linalg.api.ndarray.BaseNDArray.mmul(BaseNDArray.java:2643)
at org.deeplearning4j.nn.layers.BaseLayer.preOutput(BaseLayer.java:373)
at org.deeplearning4j.nn.layers.BaseLayer.activate(BaseLayer.java:384)
at org.deeplearning4j.nn.layers.BaseLayer.activate(BaseLayer.java:405)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.activationFromPrevLayer(MultiLayerNetwork.java:590)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.feedForwardToLayer(MultiLayerNetwork.java:713)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.computeGradientAndScore(MultiLayerNetwork.java:1821)
at org.deeplearning4j.optimize.solvers.BaseOptimizer.gradientAndScore(BaseOptimizer.java:151)
at org.deeplearning4j.optimize.solvers.StochasticGradientDescent.optimize(StochasticGradientDescent.java:54)
at org.deeplearning4j.optimize.Solver.optimize(Solver.java:51)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.fit(MultiLayerNetwork.java:1031)
at Tester.main(Tester.java:96)
Caused by: java.lang.UnsatisfiedLinkError: no openblas in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:945)
at org.bytedeco.javacpp.Loader.load(Loader.java:738)
... 24 more
4

1 回答 1

0

您似乎缺少 Deeplearning4J 运行所需的 .dll (Windows) 或 .so (Linux) 文件。您可以通过下载它们并将它们添加到您的类路径来修复它。这可以在 Eclipse 中通过选择您的项目、单击Build path、单击Configure build bath、单击Source,然后更改Native library location到 .dll 或 .so 文件下载到的文件夹来完成。

于 2019-03-17T20:09:26.067 回答