Train a simple Multilayer Perceptron using TensorFlow 2

This workflow shows how to train a simple multilayer perceptron for classification. It is demonstrated how the "DL Python Network Creator" can be used to create a simple neural network using the tf.keras API and how the "DL Python Network Learner" can be used to train the created network on data. In order to run the example, please make sure you have the following KNIME extensions installed: * KNIME Deep Learning - TensorFlow 2 Integration (Labs) You also need a local Python installation that includes TensorFlow 2. Please refer to for installation recommendations and further information.

This is a companion discussion topic for the original entry at

The DL Python Network Creator node generates this error when it is run:

ERROR DL Python Network Creator 3:23 Execute failed: ‘DataFrame’ object has no attribute ‘convert_objects’
Traceback (most recent call last):
File “”, line 5, in
File “C:\Program Files\KNIME\plugins\org.knime.dl.python_4.3.1.v202101261633\py\”, line 97, in get_layer_data_specs_as_data_frames
input_specs = extractor.input_specs_to_data_frame()
File “C:\Program Files\KNIME\plugins\org.knime.dl.python_4.3.1.v202101261633\py\”, line 57, in input_specs_to_data_frame
return self.__layer_data_specs_to_data_frame(self._network_spec.input_specs)
File “C:\Program Files\KNIME\plugins\org.knime.dl.python_4.3.1.v202101261633\py\”, line 88, in __layer_data_specs_to_data_frame
specs_with_numeric_types = specs.convert_objects(convert_numeric=True)
File “C:\ProgramData\Anaconda3\lib\site-packages\pandas\core\”, line 5462, in getattr
return object.getattribute(self, name)
AttributeError: ‘DataFrame’ object has no attribute ‘convert_objects’