I’m getting the following error when running a simple Keras auto-encoder within the -DL Python Network Creator- node:
ERROR DL Python Network Creator 0:90 Execute failed: No deep learning network type associated with Python type '<class 'tensorflow.python.framework.ops.Tensor'>'.
Please check your assignment of 'output_network' within the script and make sure you are not missing any KNIME extensions.
This piece of python code used to work fine before but not anymore whatever the version I use of KNIME or the conda environment I set. The amazing thing is that if I run the Python code inside the node, I do not get any error and everything works fine. The error happens when the node tries to transfer the Keras model from Python to KNIME.
I’m including here a minimalist workflow with two DL Python Network Creator- nodes, the left one works fine whereas the 2nd one fails to transfer the Keras NN model and throws the above mentioned error:
Thanks a lot for your prompt help. I really appreciate it !
Your hint led me to the source of the problem. My code used to work a while ago but since then Keras and tensorflow have evolved. The Keras library I was calling exists but was encoding the Keras NN as a Tensorflow type:
Yeah, the different TensorFlow/Keras versions can be a little confusing. And, right now, KNIME doesn’t really help to make the differences between the various versions (TensorFlow 1 vs 2, tensorflow.keras vs keras) more obvious. This is something we’re actively working on improving at the moment.