Hub
Pricing About
WorkflowWorkflow

Sentiment_Analysis_with_Deep_Learning_KNIME_nodes_attention_1

Deep learningKerasText classificationClassificationLstm
+12
stef profile image
Draft Latest edits on 
Oct 14, 2024 10:10 AM
Drag & drop
Like
Download workflow
Workflow preview

Sentiment Analysis with(out) attention - First working solution

This workflow shows how to train neural networks for text classification, in this case sentiment analysis, with and without attention. The used networks learn a 128 dimensional word embedding followed by a simple RNN, an LSTM and an attention-enhanced RNN.

This example, initially adapted from the Keras example script at https://github.com/keras-team/keras/blob/master/examples/imdb_lstm.py, is then enhanced to include attention as per discussion at https://towardsdatascience.com/create-your-own-custom-attention-layer-understand-all-flavours-2201b5e8be9e

Please find a thorough description of the solution on the KNIME Community Journal, "Low Code for Data Science" (see link below)

In order to run the example, please make sure you have the following KNIME extensions installed:

* KNIME Deep Learning - Keras Integration (Labs)

You also need a local Python installation that includes Keras. Please refer to https://www.knime.com/deeplearning#keras for installation recommendations and further information.

External resources

  • Experiments with Attention in KNIME: Enhancing Recurrent Neural Networks (RNNs)
Loading deploymentsLoading ad hoc jobs

Used extensions & nodes

Created with KNIME Analytics Platform version 5.3.2
  • Go to item
    KNIME Base nodesTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.2

    knime
  • Go to item
    KNIME Data GenerationTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime
  • Go to item
    KNIME Deep Learning - Keras IntegrationTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime
  • Go to item
    KNIME Deep Learning - TensorFlow 2 IntegrationTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime
  • Go to item
    KNIME JavaScript ViewsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime
  • Go to item
    KNIME JavaScript Views (Labs)Trusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime
  • Go to item
    KNIME JavasnippetTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime
  • Go to item
    KNIME Math Expression (JEP)Trusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.0

    knime
  • Go to item
    KNIME Quick FormsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.2

    knime
  • Go to item
    KNIME TextprocessingTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 5.3.2

    knime

Legal

By using or downloading the workflow, you agree to our terms and conditions.

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits