2

我正在尝试使用 1.8 Java 64x JDK 在 IntelliJ 中启动 dl4j 示例。

我完全按照说明中的说明进行操作

现在最后一步不起作用。开始时我得到数百个异常,例如:

 Error:(3,35) java:package org.deeplearning4j.berkeley does not exist 

或者

Error:(19,38) java:cannot find symbol symbol: class BaseLayer

所以我猜这个问题与包的导入有关。我需要补充一点,我是 IntelliJ 的新手。我需要考虑一些特别的东西吗?由于使用 Java 8,我是否可能需要为 Maven 重建 pom.xml?

感谢您的任何想法!

Ps maven clean install(版本:3.16.0-4-amd64)抛出一些异常:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-spark:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-spark-examples:pom:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:datavec-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:dl4j-cuda-specific-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:nd4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:rl4j-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 147, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:arbiter-examples:jar:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ org.deeplearning4j:deeplearning4j-examples-parent:0.7-SNAPSHOT, /home/usr/own installations/idea-IC-163.10154.41/dl4j-examples/pom.xml, line 44, column 21
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.deeplearning4j:deeplearning4j-examples-parent:pom:0.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-enforcer-plugin is missing. @ line 44, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] DeepLearning4j Examples Parent
[INFO] DeepLearning4j Examples
[INFO] dl4j-spark-examples
[INFO] dl4j-spark
[INFO] datavec-examples
[INFO] DeepLearning4j CUDA special examples
[INFO] nd4j-examples
[INFO] Reinforcement Learning4j Examples
[INFO] arbiter-examples
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building DeepLearning4j Examples Parent 0.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ deeplearning4j-examples-parent ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-default) @ deeplearning4j-examples-parent ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireMavenVersion failed with message:
********** Minimum Maven Version is 3.3.1. Please upgrade Maven before continuing (run "mvn --version" to check). **********
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] DeepLearning4j Examples Parent .................... FAILURE [0.902s]
[INFO] DeepLearning4j Examples ........................... SKIPPED
[INFO] dl4j-spark-examples ............................... SKIPPED
[INFO] dl4j-spark ........................................ SKIPPED
[INFO] datavec-examples .................................. SKIPPED
[INFO] DeepLearning4j CUDA special examples .............. SKIPPED
[INFO] nd4j-examples ..................................... SKIPPED
[INFO] Reinforcement Learning4j Examples ................. SKIPPED
[INFO] arbiter-examples .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.137s
[INFO] Finished at: Thu Jan 05 17:13:18 CET 2017
[INFO] Final Memory: 7M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4.1:enforce (enforce-default) on project deeplearning4j-examples-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [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/MojoExecutionException
4

1 回答 1

0

可能有点晚了,但我有同样的错误......

对我来说,是 JAVA_HOME 变量设置为 JRE 而不是 JDK。所以将 JAVA_HOME 变量设置为:C:\Program Files\Java\jdk1.8.0_112(当然版本不同)

否则有帮助链接 1:http ://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 还有一些常见的例子为什么它可能会失败......

于 2018-03-23T15:35:00.440 回答