KNIME Deep Learning - TensorFlow Integration

The KNIME Deep Learning - TensorFlow Integration gives easy access to the powerful machine learning library TensorFlow within KNIME (since version 3.6.0). This enables users to execute, build and train state of the art deep learning models.

Overview

The extension contains the following nodes:

  • The TensorFlow Network Reader node for reading TensorFlow SavedModels.

  • The TensorFlow Network Writer node for writing TensorFlow SavedModels.

  • The Keras to TensorFlow Network Converter node for converting Keras models to TensorFlow.

Additionally, the DL Python nodes provided in KNIME Deep Learning can be used to create, edit, execute and train models with user-supplied Python scripts.

Screenshot nodes overview

Installation

The KNIME Deep Learning - TensorFlow Integration extension can be installed using the KNIME Analytics Platform Update Site where it is listed under KNIME Labs Extensions.

CUDA and cuDNN

TensorFlow can use a compatible Nvidia GPU on Linux to speed up the execution of deep neural networks. To use a GPU CUDA 9.0 and cuDNN 7.0 must be installed. For detailed instructions please take a look at the official installation guides for CUDA and cuDNN.

Python Bindings

To create, edit, execute and train models with user-supplied Python scripts KNIME uses a local installation of the TensorFlow Python API which has to be set up manually. We recommend setting up a conda environment as described in this blog post and restarting KNIME after that is done. Please note that the KNIME Deep Learning - TensorFlow Integration only supports Python 3. It also requires that tensorflow or tensorflow-gpu (version of both: 1.8.0) be installed in the conda environment used by KNIME. Therefore, a typical command for creating a suitable conda environment could look like this for the GPU version of TensorFlow:

conda create -y -n py35_knime python=3.5 pandas jedi tensorflow-gpu=1.8.0

or like this for the CPU version of TensorFlow:

conda create -y -n py35_knime python=3.5 pandas jedi tensorflow=1.8.0

After creating the environment and configuring the KNIME Python preferences, please make sure to restart KNIME. Otherwise, TensorFlow will not be recognized as an available deep learning back end.

Note that the exact version of TensorFlow is important because KNIME uses the TensorFlow Java API at version 1.8.0. Using a different version can cause ambiguous errors and unexpected behavior.

Examples

Example workflows can be found on the public example server or in the node guide.

Known Issues

DL Python Network Executor scripting node outputs wrong numerical values when using Flatbuffers serialization library.

Flatbuffers in KNIME does not support float32 data at the moment. We recommend to use Apache Arrow instead. Install it via: conda install -n py35_knime -c conda-forge pyarrow=0.7.0 , where "py35_knime" is the name of your conda environment. Then select it in KNIME via File > Preferences > KNIME > Python > Serialization library.
This will be fixed in a future version of KNIME.