I’m on Windows 10.
The CPU version of OnnxImportLoad ran fine.
I change to:
<nd4j.backend>nd4j-cuda-11.4-platform</nd4j.backend>
mvn -U clean install ‘-Djavacpp.platform=windows-x86_64’
gives error:
PS C:\DL4J\onnx-import-examples> mvn -U clean install ‘-Djavacpp.platform=windows-x86_64’
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
[INFO] Scanning for projects…
[INFO]
[INFO] --------------< org.deeplearning4j:onnx-import-examples >---------------
[INFO] Building model import examples 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/nd4j/nd4j-cuda-11.4/1.0.0-M2.1/nd4j-cuda-11.4-1.0.0-M2.1-windows-x86_64.jar
Downloading from central: https://repo.maven.apache.org/maven2/org/nd4j/nd4j-cuda-11.4-preset/1.0.0-M2.1/nd4j-cuda-11.4-preset-1.0.0-M2.1-windows-x86_64.jar
Downloading from jetbrains-kotlinx: https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven/org/nd4j/nd4j-cuda-11.4-preset/1.0.0-M2.1/nd4j-cuda-11.4-preset-1.0.0-M2.1-windows-x86_64.jar
Downloading from jetbrains-kotlinx: https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven/org/nd4j/nd4j-cuda-11.4/1.0.0-M2.1/nd4j-cuda-11.4-1.0.0-M2.1-windows-x86_64.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.470 s
[INFO] Finished at: 2022-08-16T15:13:46-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project onnx-import-examples: Could not resolve dependencies for project org.deeplearning4j:onnx-import-examples:jar:1.0.0-SNAPSHOT: The following artifacts could not be resolved: org.nd4j:nd4j-cuda
-11.4-preset:jar:windows-x86_64:1.0.0-M2.1, org.nd4j:nd4j-cuda-11.4:jar:windows-x86_64:1.0.0-M2.1: Could not find artifact org.nd4j:nd4j-cuda-11.4-preset:jar:windows-x86_64:1.0.0-M2.1 in central (Central Repository:
) → [Help 1]
mvn -v
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: C:\apache-maven-3.8.1\bin..
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_241\jre
Default locale: en_US, platform encoding: Cp1252
OS name: “windows 10”, version: “10.0”, arch: “amd64”, family: “windows”
Obviously you don’t need cuda for this example; I’m getting the same error in another project.
Using: <dl4j-master.version>1.0.0-SNAPSHOT</dl4j-master.version>
gets past the jar errors but then gives:
[ERROR] /C:/DL4J/onnx-import-examples/src/main/java/org/deeplearning4j/modelimportexamples/onnx/OnnxImportLoad.java:[21,34] cannot access org.nd4j.autodiff.samediff.SameDiff
[ERROR] bad class file: C:\Users\craig.m2\repository\org\nd4j\nd4j-api\1.0.0-SNAPSHOT\nd4j-api-1.0.0-SNAPSHOT.jar(org/nd4j/autodiff/samediff/SameDiff.class)
[ERROR] class file has wrong version 55.0, should be 52.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.