尝试运行一些datavec实例。我在项目源目录中有datavec示例代码。
my gradle build file is:
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
repositories {
jcenter()
}
mainClassName="Main"
dependencies {
//compile 'org.deeplearning4j:dl4j-spark:0.4-rc3.9'
compile 'org.deeplearning4j:dl4j-spark_2.11:0.9.1_spark_1'
compile 'org.deeplearning4j:deeplearning4j-core:0.9.1'
compile 'org.nd4j:nd4j-native-platform:0.9.1'
compile 'org.slf4j:slf4j-api:1.7.21'
testCompile 'junit:junit:4.12'
}
编辑:修复了错误的星火版本。
主要程序是:
import org.deeplearning4j.api.storage.*;
public class Main {
public static void main(String[] args) {
Persistable p=null;
}
}
它可以在项目中没有任何示例代码的情况下进行构建和运行,因此可以使用核心jar。
gradle得到一个:
error: error reading C:\Users\ray\.gradle\caches\modules-2\files-2.1\org.apache.
spark\spark-core_2.11\1.4.0\9c171726a4c87f7ccce877061ad0113e222d6021\spark-core_
2.11-1.4.0.jar; error in opening zip file
没有人有dl4j的构建文件,该文件可以让一个构建并运行一些示例吗?
谢谢
edit2:使用正确的版本并删除gradle缓存使其工作。
D:\ray\dev\ml\trygradleanddl4j>gradlew clean run
:clean
:compileJava
error: error reading C:\Users\ray\.gradle\caches\modules-2\files-
...
13 errors
:compileJava FAILED
最佳答案
使用正确的版本并删除gradle缓存可使其正常工作。
关于java - deeplearning4j中datavec示例的gradle构建文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48123879/