deeplearning4j / deeplearning4j-examples

Deeplearning4j Examples (DL4J, DL4J Spark, DataVec)
http://deeplearning4j.konduit.ai
Other
2.46k stars 1.82k forks source link

Issue with running dl4j-examples #547

Closed redlight55 closed 7 years ago

redlight55 commented 7 years ago

Hi, I'm having a problem with running the dl4j-examples. I followed thoroughly based on the Quick Start Guide itself but to no avail. I also have used the YouTube videos itself which I still can't run it. Trying to test the first example (MLP Linear Classifier) but getting some errors which are shown below.

SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/kashf/OneDrive/Documents/GitHub/dl4j-examples/dl4j-spark-examples/dl4j-spark/target/dl4j-spark-0.9.1-bin.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/kashf/OneDrive/Documents/GitHub/dl4j-examples/dl4j-examples/target/dl4j-examples-0.9.1-bin.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/kashf/OneDrive/Documents/GitHub/dl4j-examples/datavec-examples/target/datavec-examples-0.9.1-bin.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/kashf/OneDrive/Documents/GitHub/dl4j-examples/rl4j-examples/target/rl4j-examples-0.9.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/kashf/OneDrive/Documents/GitHub/dl4j-examples/dl4j-cuda-specific-examples/target/dl4j-cuda-specific-examples-0.9.1-bin.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 23:48:51,482 INFO ~ Loaded [JCublasBackend] backend 23:48:55,417 WARN ~ ND4J VERSION CHECK FAILED - INCOMPATIBLE VERSIONS FOUND 23:48:55,418 WARN ~ Incompatible versions (different version number) of DL4J, ND4J, RL4J, DataVec, Arbiter are unlikely to function correctly 23:48:55,418 INFO ~ Versions of artifacts found on classpath: 23:48:56,371 INFO ~ org.datavec : datavec-api : 0.9.1 23:48:56,371 INFO ~ org.datavec : datavec-data-codec : 0.8.1-SNAPSHOT 23:48:56,371 INFO ~ org.datavec : datavec-data-image : 0.9.1 23:48:56,371 INFO ~ org.datavec : datavec-hadoop : 0.9.1 23:48:56,371 INFO ~ org.datavec : datavec-spark_2.11 : 0.9.1_spark_1 23:48:56,371 INFO ~ org.deeplearning4j : arbiter-core : 0.9.1 23:48:56,371 INFO ~ org.deeplearning4j : arbiter-deeplearning4j : 0.9.1 23:48:56,371 INFO ~ org.deeplearning4j : arbiter-ui_2.11 : 0.9.1 23:48:56,371 INFO ~ org.deeplearning4j : deeplearning4j-core : 0.9.1 23:48:56,371 INFO ~ org.deeplearning4j : deeplearning4j-modelimport : 0.9.1 23:48:56,371 INFO ~ org.deeplearning4j : deeplearning4j-nlp : 0.9.1 23:48:56,371 INFO ~ org.deeplearning4j : deeplearning4j-nn : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : deeplearning4j-parallel-wrapper_2.11 : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : deeplearning4j-play_2.11 : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : deeplearning4j-ui-components : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : deeplearning4j-ui-model : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : deeplearning4j-ui-resources : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : deeplearning4j-ui_2.11 : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : deeplearning4j-zoo : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : dl4j-spark-parameterserver_2.11 : 0.9.1_spark_1 23:48:56,372 INFO ~ org.deeplearning4j : dl4j-spark_2.11 : 0.9.1_spark_1 23:48:56,372 INFO ~ org.deeplearning4j : gym-java-client : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : nearestneighbor-core : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : rl4j-ale : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : rl4j-api : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : rl4j-core : 0.9.1 23:48:56,372 INFO ~ org.deeplearning4j : rl4j-gym : 0.9.1 23:48:56,372 INFO ~ org.nd4j : jackson : 0.9.1 23:48:56,372 INFO ~ org.nd4j : nd4j-aeron : 0.9.1 23:48:56,372 INFO ~ org.nd4j : nd4j-api : 0.9.1 23:48:56,372 INFO ~ org.nd4j : nd4j-base64 : 0.9.1 23:48:56,372 INFO ~ org.nd4j : nd4j-buffer : 0.9.1 23:48:56,372 INFO ~ org.nd4j : nd4j-common : 0.9.1 23:48:56,372 INFO ~ org.nd4j : nd4j-context : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-cuda-8.0 : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-cuda-8.0-platform : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-jackson : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-jackson-reflectionloader : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-native-api : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-native : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-native-platform : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-parameter-server-client : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-parameter-server : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-parameter-server-model : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-parameter-server-node_2.11 : 0.9.1 23:48:56,374 INFO ~ org.nd4j : nd4j-parameter-server-status_2.11 : 0.9.1 23:49:08,956 INFO ~ Number of threads used for NativeOps: 32 Exception in thread "main" java.lang.ExceptionInInitializerError at org.deeplearning4j.nn.conf.NeuralNetConfiguration$Builder.seed(NeuralNetConfiguration.java:777) at org.deeplearning4j.examples.feedforward.classification.MLPClassifierLinear.main(MLPClassifierLinear.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:6212) at org.nd4j.linalg.factory.Nd4j.initContext(Nd4j.java:6087) at org.nd4j.linalg.factory.Nd4j.(Nd4j.java:201) ... 7 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.nd4j.linalg.factory.Nd4j.initWithBackend(Nd4j.java:6188) ... 9 more Caused by: java.lang.UnsatisfiedLinkError: no jnicuda in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:976) at org.bytedeco.javacpp.Loader.load(Loader.java:777) at org.bytedeco.javacpp.Loader.load(Loader.java:684) at org.bytedeco.javacpp.cuda.(cuda.java:10) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.bytedeco.javacpp.Loader.load(Loader.java:739) at org.bytedeco.javacpp.Loader.load(Loader.java:684) at org.bytedeco.javacpp.cublas.(cublas.java:12) at org.nd4j.jita.allocator.context.impl.BasicContextPool.createNewCublasHandle(BasicContextPool.java:186) at org.nd4j.jita.allocator.context.impl.LimitedContextPool.fillPoolWithResources(LimitedContextPool.java:90) at org.nd4j.jita.allocator.context.impl.LimitedContextPool.(LimitedContextPool.java:56) at org.nd4j.jita.handler.impl.CudaZeroHandler.(CudaZeroHandler.java:131) at org.nd4j.jita.allocator.impl.AtomicAllocator.(AtomicAllocator.java:128) at org.nd4j.jita.allocator.impl.AtomicAllocator.(AtomicAllocator.java:74) at org.nd4j.linalg.jcublas.JCublasNDArrayFactory.(JCublasNDArrayFactory.java:86) ... 14 more Caused by: java.lang.UnsatisfiedLinkError: C:\Users\kashf.javacpp\cache\dl4j-cuda-specific-examples-0.9.1-bin.jar\org\bytedeco\javacpp\windows-x86_64\jnicuda.dll: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:956) ... 29 more

Process finished with exit code 1

Do note that I have never tried using Maven before, only IntelliJ. My purpose is to build an AI that works on Android so DL4J is the best library I've found so far but I need to test different types of AI to see which one is the best. I saw that I need the examples to work before I can even start using the library. I really need help. Please and thank you.

agibsonccc commented 7 years ago

@redlight55 somehow you've changed versions or are trying to run cuda. We have an android page here: http://deeplearning4j.org/android From the looks of it, you're trying to run cuda without cuda installed?

redlight55 commented 7 years ago

I've already seen the android section which is why dl4j fits my project. I'm trying to test different types of ANN before I start using it on android. From what I can tell, the android library is understandable. I just want to run examples first. Trying to build a simple ANN and CovNet. Quick question, is the dl4j-examples supposed to have multiple different main folders? Is it that I'm running something that requires something else?

AlexDBlack commented 7 years ago

@redlight55 There are intentionallly a bunch of different modules, for different types of examples (datavec, DL4J, cuda-specific DL4J examples, RL4J, Spark etc)

redlight55 commented 7 years ago

I found my issue when trying to run the MLP Linear Classification. I didn't select the example folder inside but instead loaded the whole folder where it had all the datavec, DL4J, etc.

Previously: GitHub/dl4j-examples

Now: GitHub/dl4j-examples/dl4j-examples

I had to be specific on importing the folders. Thank you for all the help. Cheers.