This workflow trains a Deep Convolutional Generative Adversarial Network (DCGAN) that learns to create digits similar to MNIST.
As the name implies, the training is based on Generative Adversarial Networks. In a nutshell this means that a generator network tries to create images that a discriminator network deems to be real images. Both networks are randomly initialized and updated alternately, until in theory, the generator learns to create images that look real enough to fool the discriminator.
The workflow builds the generator network using the Keras Layer nodes and then trains and applies it using the TensorFlow 2 integration.
In order to run the example, please make sure you have the following KNIME extensions installed:
* KNIME Deep Learning - TensorFlow 2 Integration (Labs)
* KNIME Deep Learning - Keras Integration (Labs)
* KNIME Image Processing (Community Contributions Trusted)
* KNIME Image Processing - Python Extensions (Community Contributions Trusted)
* KNIME Image Processing - Deep Learning Extension (Community Contributions Trusted)
You also need a local Python installation that includes TensorFlow 2. Please refer to https://docs.knime.com/2020-07/deep_learning_installation_guide/index.html#tensorflow2-integration for installation recommendations and further information.
Set-up
Deep Learning Set-up
1. Install the KNIME extensions
- KNIME Deep Learning - Keras Integration
- KNIME Deep Learning - TensorFlow 2 Integration
2. Go to File -> Preferences -> Python Deep Learning
- Setup the Python environments for Keras and TensorFlow 2.
(You can create a new environment with all dependencies via the "New environment..." button.)
- Under "Library used for the "DL Python" scripting nodes", select TensorFlow 2.
Image Processing Set-up:
1. Install the KNIME extensions
- KNIME Image Processing
- KNIME Image Processing - Python Extensions
- KNIME Image Processing - Deep Learning Extension
Acknowledgements:
The architecture of the created network was taken but slightly changed from https://www.tensorflow.org/tutorials/generative/dcgan.
The enclosed pictures are from the MNIST dataset (http://yann.lecun.com/exdb/mnist/) [1].
[1] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998.
To use this workflow in KNIME, download it from the below URL and open it in KNIME:
Download WorkflowDeploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com, follow @NodePit on Twitter or botsin.space/@nodepit on Mastodon.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.