-
Book Overview & Buying
-
Table Of Contents
Codeless Deep Learning with KNIME
By :
In this section, you will learn how to install and set up KNIME Deep Learning - Keras Integration in order to train neural networks in KNIME Analytics Platform.
KNIME Analytics Platform consists of a software core and several provided extensions and integrations. Such extensions and integrations are provided by the KNIME community and extend the original software core through a variety of data science functionalities, including advanced algorithms for AI.
The KNIME extension of interest here is called KNIME Deep Learning – Keras Integration. It offers a codeless GUI-based integration of the Keras library, while using TensorFlow as its backend. This means that a number of functions from Keras libraries have been wrapped into KNIME nodes, within KNIME's classic, easy-to-use visual dialog window. Due to this integration, you can read, write, create, train, and execute deep learning networks without writing code.
Another deep learning integration that's available is called KNIME Deep Learning - TensorFlow Integration. This extension allows you to convert Keras models into TensorFlow models, as well as read, execute, and write TensorFlow models.
TensorFlow is an open source library provided by Google that includes a number of deep learning paradigms. TensorFlow functions can run on single devices, as well as on multiple CPUs and multiple GPUs. This parallel calculation feature is the key to speeding up the computationally intensive training that's required for deep learning networks.
However, using the TensorFlow library within Python can prove quite complicated, even for an expert Python programmer or a deep learning pro. Thus, a number of simplified interfaces have been developed on top of TensorFlow that expose a subset of its functions and parameters. The most successful of such TensorFlow-based libraries is Keras. However, even Keras still requires some programming skills. The KNIME Deep Learning – Keras Integration puts the KNIME GUI on top of the Keras libraries that are available, mostly eliminating the need to code.
To make the KNIME Deep Learning – Keras Integration work, a few pieces of the puzzle need to be installed:
Let's start with the first piece: installing the Keras and TensorFlow nodes.
To add nodes to the Node Repository, you must install a few extensions and integrations.
You can install them from within KNIME Analytics Platform by clicking on File from the top menu and selecting Install KNIME Extension…. This opens the dialog shown in Figure 1.18:
Figure 1.18 – Dialog for installing extensions
From this new dialog, you can select the extensions and integrations you want to install. Using the search bar at the top is helpful for filtering the available extensions and integrations.
Tip
Another way you can install extensions is by dragging and dropping them from the KNIME Hub.
To install the Keras and TensorFlow nodes that will be used in the case studies described in this book, you need to select the following:
Then, press the Next button, accept the terms and conditions, and click Finish. Once the installation is done, you need to restart KNIME Analytics Platform.
At this point, you should have the Keras and TensorFlow nodes in your Node Repository (Figure 1.19):
Figure 1.19 – Installed deep learning nodes in the Node Repository
A large number of nodes implement neural layers: the nodes for input and dropout layers can be found in the Core sub-category, the nodes for LSTM layers can be found in Recurrent, and the nodes for embedding layers can be found in Embedding. Then, there are the Learner, Reader, and Writer nodes, which can be used to train, load, and store a network, respectively. All these nodes have a configuration window and don't require any coding. The Python deep learning nodes allow you to define, train, execute, and edit networks using Python code. The last subcategory contains TensorFlow-based nodes.
Next, we need to set up the Python environment.
The KNIME Keras Integration and the KNIME TensorFlow Integration depend on an existing Python installation, which requires certain Python dependencies to be installed.
Similar to the KNIME Python Integration, the KNIME Deep Learning Integration uses Anaconda to manage Python environments. If you have already installed Anaconda for, for example, the KNIME Python Integration, you can skip the first step.
Let's get started:
You should now see a dialog like that in Figure 1.20:

Figure 1.20 – Python Deep Learning preference page
From this page, create some Conda environments with the correct packages installed for Keras or TensorFlow 2. For the case studies in this book, it will be sufficient to set up an environment for Keras.
This opens a new dialog, as in Figure 1.21, where you can set the new environment's name:

Figure 1.21 – Dialog for setting the new environment's name
Now, you can get started. In this section, you were introduced to the most convenient way of setting up a Python environment. Other options can be found in the KNIME documentation: https://docs.knime.com/2019-06/deep_learning_installation_guide/index.html#keras-integration.