org.nd4j.linalg.factory.nd4j.zeros(长,长)

yizd12fk  于 2021-08-20  发布在  Java
关注(0)|答案(1)|浏览(350)

试图使用 io.github.ensozos.core.MPdistance.getMPdistance 使用maven,我得到以下错误:

Exception in thread "main" java.lang.NoSuchMethodError:
 'org.nd4j.linalg.api.ndarray.INDArray org.nd4j.linalg.factory.Nd4j.zeros(long, long)'
    at io.github.ensozos.core.MPdistance.getMassDistMatrix(MPdistance.java:116)
    at io.github.ensozos.core.MPdistance.getMPdistance(MPdistance.java:52)
    at Main.Main.main(Main.java:104)

我使用的是nd4j版本1.0.0-beta7。
我认为,这是一个错误有关 org.nd4j.linalg.api.ndarray.INDArray 没有 zeros(long, long) 方法。有办法解决这个问题吗?

bn31dyow

bn31dyow1#

我在您的项目上运行了mvn dependency:tree,结果发现有旧版本被引入:

io.github.ensozos:matrix-profile:jar:0.0.3:compile
[INFO] |  \- org.nd4j:nd4j-native-platform:jar:1.0.0-beta2:compile
[INFO] |     +- org.nd4j:nd4j-native:jar:android-arm:1.0.0-beta2:compile
[INFO] |     +- org.nd4j:nd4j-native:jar:android-arm64:1.0.0-beta2:compile
[INFO] |     +- org.nd4j:nd4j-native:jar:android-x86:1.0.0-beta2:compile
[INFO] |     +- org.nd4j:nd4j-native:jar:android-x86_64:1.0.0-beta2:compile
[INFO] |     +- org.nd4j:nd4j-native:jar:ios-arm64:1.0.0-beta2:compile
[INFO] |     +- org.nd4j:nd4j-native:jar:ios-x86_64:1.0.0-beta2:compile
[INFO] |     +- org.nd4j:nd4j-native:jar:linux-x86_64:1.0.0-beta2:compile
[INFO] |     +- org.nd4j:nd4j-native:jar:macosx-x86_64:1.0.0-beta2:compile
[INFO] |     \- org.nd4j:nd4j-native:jar:linux-ppc64le:1.0.0-beta2:compile
[INFO] +- org.nd4j:nd4j-native:jar:1.0.0-beta7:compile
[INFO] |  +- org.nd4j:nd4j-native:jar:windows-x86_64:1.0.0-beta7:compile
[INFO] |  +- org.nd4j:nd4j-native-api:jar:1.0.0-beta7:compile
[INFO] |  \- org.nd4j:nd4j-api:jar:1.0.0-beta7:compile
[INFO] |     \- org.nd4j:protobuf:jar:1.0.0-beta7:compile
[INFO] +- org.datavec:datavec-api:jar:1.0.0-beta7:compile
[INFO] |  +- org.nd4j:jackson:jar:1.0.0-beta7:compile
[INFO] |  \- org.nd4j:nd4j-common:jar:1.0.0-beta7:compile
[INFO] |     \- org.nd4j:guava:jar:1.0.0-beta7:compile
[INFO] \- org.deeplearning4j:deeplearning4j-parallel-wrapper:jar:1.0.0-beta7:compile
[INFO]    +- org.nd4j:nd4j-parameter-server:jar:1.0.0-beta7:compile
[INFO]    |  +- org.nd4j:nd4j-parameter-server-model:jar:1.0.0-beta7:compile
[INFO]    |  \- org.nd4j:nd4j-aeron:jar:1.0.0-beta7:compile
[INFO]    \- org.nd4j:nd4j-parameter-server-client:jar:1.0.0-beta7:compile

(参见beta2 vs beta7)我建议只获取这个库的源代码并进行更新。除非库的作者打算更新版本,否则需要fork。
更新项目中包含的版本将不起作用,因为从beta2到7的一些更改破坏了此处的向后兼容性。

相关问题