0 votes

Dear all,

I'm facing an issue when trying to implement my own keras layer. After training the model, it crashes when trying to load the model. The load_model() command leads to the following error message:

File "/home/dataiku/dss_data/code-envs/python/google_api/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 134, in deserialize_keras_object
    ': ' + class_name)

After some google investigations, it seems the load_model() function should integrate a second optional argument which is a dictionary of the custom objects --> custom_objects={'LayerCustom: LayerCustom }.

Unfortunately, the load_model() function is called without this optional argument from dataiku as is it observed in the log file:

model = load_model(osp.join(run_folder, constants.KERAS_MODEL_FILENAME))

Would some of you have already implemented your own keras layers ? If yes, was it successful and did you face the problem ?

Thanks for your help,


reopened by

1 Answer

0 votes
Best answer

It is currently not possible to define custom_objects in the Deep Learning section of visual ML of DSS.

We will work on adding this functionality for a future release of DSS.

To make it work, you would need to use a python recipe, where you would need to handle yourself the preprocessing and the training.


Nicolas Servel
selected by
Thanks Nicolas,
I successfully implemented it by using a python recipe as you mentioned !
Good to know that it will be added in the future release of DSS.
1,296 questions
1,323 answers
11,862 users

┬ęDataiku 2012-2018 - Privacy Policy