Load keras "Functional" model

Does DL4J load “Functional” model? The tutorial shows we need to generate “Sequential” model in order to load in to DL4J.

To import a Keras model, you need to create and serialize such a model first.

Sequential model example:

model = keras.Sequential([keras.Input((32,)), keras.layers.Dense(1)])config = model.get_config()new_model = keras.Sequential.from_config(config)

Functional model example:

inputs = keras.Input((32,))outputs = keras.layers.Dense(1)(inputs)model = keras.Model(inputs, outputs)config = model.get_config()new_model = keras.Model.from_config(config)

When you take a look at the documentation you find that it does support functional model import: https://deeplearning4j.konduit.ai/keras-import/model-functional

Ah, OK, thanks. I am still struggling to load my model with UpSampling3D error as shown in another thread. I am trying to test different senarios like this “Sequential” model.

I downloaded another model from someone else which also contains UpSampling3D model, it shows same error.: