Skip to content

Instantly share code, notes, and snippets.

@yilaguan
Last active October 14, 2016 02:41
Show Gist options
  • Save yilaguan/604bb659b67f3334265afa59929b30cb to your computer and use it in GitHub Desktop.
Save yilaguan/604bb659b67f3334265afa59929b30cb to your computer and use it in GitHub Desktop.
Project nd4j-example: Compilation failure: Compilation failure
When I compile the project "dl4j-examples" and use command:
```
git clone https://github.com/deeplearning4j/dl4j-examples.git
cd dl4j-examples/
mvn clean install
```
but I get some ERROR as below:
```
[INFO] DeepLearning4j Examples Parent .................... SUCCESS [0.382s]
[INFO] DeepLearning4j Examples ........................... SUCCESS [49.718s]
[INFO] dl4j-spark-examples ............................... SUCCESS [1.708s]
[INFO] dl4j-spark-local .................................. SUCCESS [45.702s]
[INFO] dl4j-spark-cdh .................................... SUCCESS [0.859s]
[INFO] dl4j-spark-hdp .................................... SUCCESS [0.158s]
[INFO] datavec-examples .................................. SUCCESS [10.958s]
[INFO] DeepLearning4j CUDA special examples .............. SUCCESS [36.879s]
[INFO] nd4j-examples ..................................... FAILURE [0.586s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:27.166s
[INFO] Finished at: Thu Oct 13 20:07:41 CST 2016
[INFO] Final Memory: 76M/417M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project nd4j-examples: Compilation failure: Compilation failure:
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx3_GettingAndSettingSubsets.java:[39,16] error: no suitable method found for addi(double)
[ERROR]
[ERROR] method INDArray.addi(Number) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] method INDArray.addi(INDArray) is not applicable
[ERROR] (argument mismatch; double cannot be converted to INDArray)
[ERROR] method INDArray.addi(IComplexNumber) is not applicable
[ERROR] (argument mismatch; double cannot be converted to IComplexNumber)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx3_GettingAndSettingSubsets.java:[54,46] error: method get in interface INDArray cannot be applied to given types;
[ERROR]
[ERROR] could not parse error message: required: INDArrayIndex[]
[ERROR] found: INDArrayIndex,INDArrayIndex
[ERROR] reason: actual and formal argument lists differ in length
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx3_GettingAndSettingSubsets.java:57: error: no suitable method found for addi(int)
[ERROR] first3Columns.addi(100);
[ERROR] ^
[ERROR]
[ERROR] method INDArray.addi(Number) is not applicable
[ERROR] (argument mismatch; int cannot be converted to Number)
[ERROR] method INDArray.addi(INDArray) is not applicable
[ERROR] (argument mismatch; int cannot be converted to INDArray)
[ERROR] method INDArray.addi(IComplexNumber) is not applicable
[ERROR] (argument mismatch; int cannot be converted to IComplexNumber)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx3_GettingAndSettingSubsets.java:[82,19] error: no suitable method found for addi(int)
[ERROR]
[ERROR] method INDArray.addi(Number) is not applicable
[ERROR] (argument mismatch; int cannot be converted to Number)
[ERROR] method INDArray.addi(INDArray) is not applicable
[ERROR] (argument mismatch; int cannot be converted to INDArray)
[ERROR] method INDArray.addi(IComplexNumber) is not applicable
[ERROR] (argument mismatch; int cannot be converted to IComplexNumber)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx4_Ops.java:[36,40] error: no suitable method found for add(double)
[ERROR]
[ERROR] method INDArray.add(Number) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] method INDArray.add(INDArray) is not applicable
[ERROR] (argument mismatch; double cannot be converted to INDArray)
[ERROR] method INDArray.add(IComplexNumber) is not applicable
[ERROR] (argument mismatch; double cannot be converted to IComplexNumber)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx4_Ops.java:[42,43] error: no suitable method found for addi(double)
[ERROR]
[ERROR] method INDArray.addi(Number) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] method INDArray.addi(INDArray) is not applicable
[ERROR] (argument mismatch; double cannot be converted to INDArray)
[ERROR] method INDArray.addi(IComplexNumber) is not applicable
[ERROR] (argument mismatch; double cannot be converted to IComplexNumber)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx4_Ops.java:[82,99] error: incompatible types: double cannot be converted to Number
[ERROR]
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx6_BooleanIndexing.java:[24,58] error: no suitable method found for muli(int)
[ERROR]
[ERROR] method INDArray.muli(Number) is not applicable
[ERROR] (argument mismatch; int cannot be converted to Number)
[ERROR] method INDArray.muli(INDArray) is not applicable
[ERROR] (argument mismatch; int cannot be converted to INDArray)
[ERROR] method INDArray.muli(IComplexNumber) is not applicable
[ERROR] (argument mismatch; int cannot be converted to IComplexNumber)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx6_BooleanIndexing.java:[31,64] error: no suitable method found for lessThan(double)
[ERROR]
[ERROR] method Conditions.lessThan(IComplexNumber) is not applicable
[ERROR] (argument mismatch; double cannot be converted to IComplexNumber)
[ERROR] method Conditions.lessThan(Number) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx6_BooleanIndexing.java:[36,23] error: no suitable method found for replaceWhere(INDArray,double,Condition)
[ERROR]
[ERROR] method BooleanIndexing.replaceWhere(INDArray,INDArray,Condition) is not applicable
[ERROR] (argument mismatch; double cannot be converted to INDArray)
[ERROR] method BooleanIndexing.replaceWhere(INDArray,Number,Condition) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx6_BooleanIndexing.java:[42,65] error: no suitable method found for lessThan(double)
[ERROR]
[ERROR] method Conditions.lessThan(IComplexNumber) is not applicable
[ERROR] (argument mismatch; double cannot be converted to IComplexNumber)
[ERROR] method Conditions.lessThan(Number) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx6_BooleanIndexing.java:[47,65] error: no suitable method found for greaterThan(double)
[ERROR]
[ERROR] method Conditions.greaterThan(IComplexNumber) is not applicable
[ERROR] (argument mismatch; double cannot be converted to IComplexNumber)
[ERROR] method Conditions.greaterThan(Number) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx6_BooleanIndexing.java:[48,56] error: no suitable method found for exec(MatchCondition,int)
[ERROR]
[ERROR] method OpExecutioner.exec(Op,int...) is not applicable
[ERROR] (argument mismatch; int cannot be converted to int[])
[ERROR] method OpExecutioner.exec(Accumulation,int...) is not applicable
[ERROR] (argument mismatch; int cannot be converted to int[])
[ERROR] method OpExecutioner.exec(BroadcastOp,int...) is not applicable
[ERROR] (argument mismatch; MatchCondition cannot be converted to BroadcastOp)
[ERROR] method OpExecutioner.exec(IndexAccumulation,int...) is not applicable
[ERROR] (argument mismatch; MatchCondition cannot be converted to IndexAccumulation)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx1_INDArrayBasics.java:[68,35] error: no suitable method found for add(double)
[ERROR]
[ERROR] method INDArray.add(Number) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] method INDArray.add(INDArray) is not applicable
[ERROR] (argument mismatch; double cannot be converted to INDArray)
[ERROR] method INDArray.add(IComplexNumber) is not applicable
[ERROR] (argument mismatch; double cannot be converted to IComplexNumber)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx1_INDArrayBasics.java:[72,36] error: no suitable method found for mul(double)
[ERROR]
[ERROR] method INDArray.mul(Number) is not applicable
[ERROR] (argument mismatch; double cannot be converted to Number)
[ERROR] method INDArray.mul(INDArray) is not applicable
[ERROR] (argument mismatch; double cannot be converted to INDArray)
[ERROR] method INDArray.mul(IComplexNumber) is not applicable
[ERROR] (argument mismatch; double cannot be converted to IComplexNumber)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx5_Accumulations.java:[50,47] error: incompatible types: int cannot be converted to int[]
[ERROR]
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx5_Accumulations.java:[51,47] error: incompatible types: int cannot be converted to int[]
[ERROR]
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx5_Accumulations.java:[52,47] error: incompatible types: int cannot be converted to int[]
[ERROR]
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx5_Accumulations.java:[53,48] error: incompatible types: int cannot be converted to int[]
[ERROR]
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx5_Accumulations.java:[54,49] error: incompatible types: int cannot be converted to int[]
[ERROR]
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx5_Accumulations.java:[66,48] error: incompatible types: int cannot be converted to int[]
[ERROR]
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx5_Accumulations.java:[73,61] error: incompatible types: int cannot be converted to int[]
[ERROR]
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx5_Accumulations.java:[75,56] error: no suitable method found for exec(IMin,int)
[ERROR]
[ERROR] method OpExecutioner.exec(Op,int...) is not applicable
[ERROR] (argument mismatch; int cannot be converted to int[])
[ERROR] method OpExecutioner.exec(Accumulation,int...) is not applicable
[ERROR] (argument mismatch; IMin cannot be converted to Accumulation)
[ERROR] method OpExecutioner.exec(BroadcastOp,int...) is not applicable
[ERROR] (argument mismatch; IMin cannot be converted to BroadcastOp)
[ERROR] method OpExecutioner.exec(IndexAccumulation,int...) is not applicable
[ERROR] (argument mismatch; int cannot be converted to int[])
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx2_CreatingINDArrays.java:[79,37] error: no suitable method found for ones(int,int,int)
[ERROR]
[ERROR] method Nd4j.ones(int,int) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Nd4j.ones(int) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Nd4j.ones(int...) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx2_CreatingINDArrays.java:[80,36] error: no suitable method found for ones(int,int,int,int)
[ERROR]
[ERROR] method Nd4j.ones(int,int) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Nd4j.ones(int) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Nd4j.ones(int...) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx2_CreatingINDArrays.java:[81,36] error: no suitable method found for ones(int,int,int,int,int)
[ERROR]
[ERROR] method Nd4j.ones(int,int) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Nd4j.ones(int) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Nd4j.ones(int...) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx2_CreatingINDArrays.java:[93,30] error: no suitable method found for vstack(INDArray,INDArray)
[ERROR]
[ERROR] method Nd4j.vstack(INDArray...) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] method Nd4j.vstack(Collection) is not applicable
[ERROR] (actual and formal argument lists differ in length)
[ERROR] /home/yilaguan/IdeaProjects/dl4j-examples/nd4j-examples/src/main/java/org/nd4j/examples/Nd4jEx2_CreatingINDArrays.java:[94,30] error: no suitable method found for hstack(INDArray,INDArray)
[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 :nd4j-examples
```
How can I do to deal with this problem?
@yilaguan
Copy link
Author

Changing the maven version will solve the problem.
Apache MAVEN version=3.3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment