Skip to content

Commit

Permalink
this issue was corrected by changing the assembly merge strategy. DL4…
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlue committed Aug 28, 2018
1 parent 45aca25 commit 3740e9f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ libraryDependencies ++= Seq(
// "org.deeplearning4j" % "deeplearning4j-cuda-9.2" % "1.0.0-beta2"

"org.nd4j" % "nd4j-native-platform" % "1.0.0-beta2",
"org.deeplearning4j" % "deeplearning4j-core" % "1.0.0-beta2",
"org.bytedeco.javacpp-presets" % "openblas" % "0.2.20-1.3" classifier "linux-x86_64"
"org.deeplearning4j" % "deeplearning4j-core" % "1.0.0-beta2"
)

assemblyMergeStrategy in assembly := {
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
case x => MergeStrategy.first
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package simplecuda
package com.simplecuda

import java.io.{File, FileInputStream, ObjectInputStream}

Expand All @@ -24,7 +24,8 @@ import org.nd4j.linalg.factory.Nd4j
import org.nd4j.linalg.learning.config.Sgd
import org.nd4j.linalg.lossfunctions.LossFunctions

object main extends App{
object Main extends App{

val recordReader = new CSVRecordReader(0,",")
recordReader.initialize(new FileSplit(new ClassPathResource("iris.txt").getFile()))

Expand Down Expand Up @@ -80,4 +81,5 @@ object main extends App{
val output = model.output(testData.getFeatures())
eval.eval(testData.getLabels(), output)
println(eval.stats())

}
2 changes: 1 addition & 1 deletion src/test/scala/com/simplecuda/SimpleCudaTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class SimpleCudaTest extends FlatSpec with Matchers {

"SimpleCuda" should "load a serialized model" in {
lazy val model: ComputationGraph = ModelSerializer
.restoreComputationGraph(getClass.getClassLoader.getResourceAsStream("rasar.zip"),false)
.restoreComputationGraph(getClass.getClassLoader.getResourceAsStream("random.zip"),false)
println(model.layerSize(0))
}
}

0 comments on commit 3740e9f

Please sign in to comment.