Skip to content

Instantly share code, notes, and snippets.

@jef5ez
jef5ez / dl4j.scala
Created May 17, 2017 19:40
keras -> dl4j
val model = KerasModelImport.importKerasSequentialModelAndWeights(
"keras4j.json",
"keras4j.h5")
val (trackLength, vectorDim, groupSize) = (30, 2, 8)
val o = Array.fill(trackLength * vectorDim * groupSize)(1.0)
val ones = Nd4j.create(o, Array(1, groupSize, vectorDim, trackLength))