deeplearning4j: Unsupported keras layer type Model

Hi,

I’m trying to load a CNN model with a dense layer at the end saved with Keras but it’s not working.

That’s my code :

net = KerasModelImport.importKerasSequentialModelAndWeights(PATH_TO_H5_FILE,false);

And I get this :

org.deeplearning4j.nn.modelimport.keras.UnsupportedKerasConfigurationException: Unsupported keras layer type Model. Please file an issue at http://github.com/deeplearning4j/deeplearning4j/issues.
	at org.deeplearning4j.nn.modelimport.keras.KerasLayer.getKerasLayerFromConfig(KerasLayer.java:254)
	at org.deeplearning4j.nn.modelimport.keras.KerasModel.helperPrepareLayers(KerasModel.java:190)
	at org.deeplearning4j.nn.modelimport.keras.KerasSequentialModel.<init>(KerasSequentialModel.java:99)
	at org.deeplearning4j.nn.modelimport.keras.KerasSequentialModel.<init>(KerasSequentialModel.java:56)
	at org.deeplearning4j.nn.modelimport.keras.KerasModel$ModelBuilder.buildSequential(KerasModel.java:581)
	at org.deeplearning4j.nn.modelimport.keras.KerasModelImport.importKerasSequentialModelAndWeights(KerasModelImport.java:140)
	at com.ibm.watson.sentimentanalysis.model.DeepLearning4JModel.load(DeepLearning4JModel.java:71)
	at com.ibm.watson.sentimentanalysis.model.DeepLearning4JModel.main(DeepLearning4JModel.java:99)

Am I missing a step ? Could it be a Keras version problem ? I’m using 1.2.1. Should I be using another one ?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@pharnoux @LeeTL1220 @agibsonccc yeah, I apologize: the 1D convolution import stuff became orphaned when I was pulled onto another project. Other Skymind personnel are taking over Keras development, so things should start moving again soon!