Hi All, just getting started, and trying to import a model so that I can just do evaluations of it in the Java side. I’ve not been directly involved in training of the model, but given the keras model, I suppose I can consider this as a black box.
I’m just trying to read using the following:
String modelFile = “/home/ernest/Desktop/Test/Model_slideWin_S2048”;
Path modelPath = Paths.get(modelFile);
System.err.println("reading model");
byte[] bytes = Files.readAllBytes(modelPath);
System.err.println("parsing model");
ComputationGraph cg = null;
try (InputStream modelInputStream = new ByteArrayInputStream(bytes)) {
cg = KerasModelImport.importKerasModelAndWeights(modelInputStream);
}
System.err.println("read model");
but getting results:
reading model
parsing model
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See SLF4J Error Codes for further details.
Exception in thread “main” java.lang.ExceptionInInitializerError
at org.deeplearning4j.nn.modelimport.keras.Hdf5Archive.readDataSet(Hdf5Archive.java:300)
at org.deeplearning4j.nn.modelimport.keras.Hdf5Archive.readDataSet(Hdf5Archive.java:114)
at org.deeplearning4j.nn.mod