maven 编译时出错了

2015-07-09 22:20:11 +08:00
 luolianhai

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/luolianhai/deeplearning4j/deeplearning4j-core/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java:[78,46] cannot find symbol
symbol: method getSeed()
location: interface org.nd4j.linalg.api.rng.Random
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] DeepLearning4j ..................................... SUCCESS [ 1.755 s]
[INFO] dl4j-test-resources ................................ SUCCESS [ 48.469 s]
[INFO] deeplearning4j-core ................................ FAILURE [ 10.408 s]
[INFO] DeepLearning4j-scaleout-parent ..................... SKIPPED
[INFO] deeplearning4j-scaleout-api ........................ SKIPPED
[INFO] deeplearning4j-scaleout-zookeeper .................. SKIPPED
[INFO] deeplearning4j-scaleout-akka ....................... SKIPPED
[INFO] deeplearning4j-nlp ................................. SKIPPED
[INFO] DeepLearning4j-AWS ................................. SKIPPED
[INFO] hadoop-yarn ........................................ SKIPPED
[INFO] cdh4 ............................................... SKIPPED
[INFO] deeplearning4j-nlp-yarn ............................ SKIPPED
[INFO] org.deeplearning4j.spark ........................... SKIPPED
[INFO] dl4j-spark ......................................... SKIPPED
[INFO] dl4j-spark-nlp ..................................... SKIPPED
[INFO] dl4j-spark-ml ...................................... SKIPPED
[INFO] deeplearning4j-cli ................................. SKIPPED
[INFO] deeplearning4j-cli-api ............................. SKIPPED
[INFO] deeplearning4j-ui .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2015-07-09T21:00:48+08:00
[INFO] Final Memory: 25M/119M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project deeplearning4j-core: Compilation failure
[ERROR] /home/luolianhai/deeplearning4j/deeplearning4j-core/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java:[78,46] cannot find symbol
[ERROR] symbol: method getSeed()
[ERROR] location: interface org.nd4j.linalg.api.rng.Random
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :deeplearning4j-core

报错原因为[ERROR] /home/luolianhai/deeplearning4j/deeplearning4j-core/src/main/java/org/deeplearning4j/nn/weights/WeightInitUtil.java:[78,46] cannot find symbol
[ERROR] symbol: method getSeed()
是getSeed()未定义还是?代码是从网上下载的开源代码,求搭救!

2121 次点击
所在节点    问与答
1 条回复
luolianhai
2015-07-10 10:46:00 +08:00
补充一下,WeightInitUtil.java的第78行是这样的:Nd4j.getRandom().setSeed(Nd4j.getRandom().getSeed());
网上有说法是要在pom.xml加上getSeed()所在的包的依赖,小弟不懂,望大神指教

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/204593

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX