Error trying to run a KNIME example

Hi I downloaded a neural network example from this link https://hub.knime.com/knime/spaces/Examples/latest/50_Applications/47_Image_Recognition_for_Retail/01_Data_Preparation_and_CNN_Training
and have been trying to run it but when I run the node DL python network creator it shows this error:

ERROR DL Python Network Creator 0:285:88 Execute failed: Tensor is unhashable if Tensor equality is enabled. Instead, use tensor.experimental_ref() as the key.
Traceback (most recent call last):
File “”, line 5, in
File “C:\Program Files\KNIME\plugins\org.knime.dl.python_4.1.0.v201909231406\py\DLPythonNetworkSpecToDataFrameConverter.py”, line 96, in get_layer_data_specs_as_data_frames
extractor = DLPythonNetworkSpecToDataFrameConverter(network.spec)
File “C:\Program Files\KNIME\plugins\org.knime.dl.keras_4.1.0.v201911110939\py\DLKerasNetwork.py”, line 150, in spec
self._spec = self._extract_model_spec()
File “C:\Program Files\KNIME\plugins\org.knime.dl.keras_4.1.0.v201911110939\py\DLKerasTensorFlowNetwork.py”, line 87, in _extract_model_spec
return DLKerasTensorFlowNetworkSpecExtractor(self._model).extract_spec()
File “C:\Program Files\KNIME\plugins\org.knime.dl.keras_4.1.0.v201911110939\py\DLKerasNetworkSpecExtractor.py”, line 95, in extract_spec
self._extract_node_input_tensor_specs(layer, node_idx)
File “C:\Program Files\KNIME\plugins\org.knime.dl.keras_4.1.0.v201911110939\py\DLKerasNetworkSpecExtractor.py”, line 149, in _extract_node_input_tensor_specs
if input_tensor in self._model_inputs and input_tensor not in self._visited_inputs:
File “C:\Users\user\Anaconda3\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 705, in hash
raise TypeError("Tensor is unhashable if Tensor equality is enabled. "
TypeError: Tensor is unhashable if Tensor equality is enabled. Instead, use tensor.experimental_ref() as the key.

Can anyone help? I already installed everything necesary for this exercise. Thanks

Hi @Gregorio96,

This problem has already been answered in this forum post: ERROR Keras Network Learner 0:14 Tensor is unhashable if Tensor equality is enabled. Instead, use tensor.experimental_ref() as the key.

KNIME currently does not support TensorFlow 2. Please make sure to have Keras 2.1.6 and TensorFlow 1.8.0 installed in your Python environment instead. Please refer to this installation guide to learn how this can be done directly within KNIME.

Marcel

2 Likes