Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup scala sbt project for nd4j and deeplearning4j

I want to run the LSTM code from deeplearning4j examples in my own sbt project using scala. My setup is Ubuntu 14.04, sbt 0.13, Oracle Java 8, nd4j version 0.5.0, scala 2.11.8. My approach can be found in my git repo. Feel free to clone it. On runtime I get the following warnings and errors. How can I fix this?

like image 601
Sebastian Avatar asked Nov 08 '22 10:11

Sebastian


2 Answers

Just look at the nd4s build.sbt: https://github.com/deeplearning4j/nd4s/blob/master/build.sbt

like image 199
Adam Gibson Avatar answered Nov 14 '22 22:11

Adam Gibson


Possibly due to a bug in SBT some internal variables are currently not resolved causing the resolution of the dependency 'nd4j-native-package' to fail. As a workaround you can use the following dependency declaration for nd4j:

libraryDependencies ++= Seq(
  "org.nd4j" % "nd4j-native" % "0.5.0" classifier "$platform",
  "org.nd4j" % "nd4j-native" % "0.5.0"
)

For a comprehensive list which platform strings are supported see http://nd4j.org/dependencies.html

Hope it helps.

like image 32
Sebastian Avatar answered Nov 14 '22 22:11

Sebastian