Codeless Deep Learning Book

I’m getting errors when trying to execute the workflows for chapters 7 and 8. The problem is with the Keras Network Learner Node. The node works in examples in other chapters. Chap 7 Training Console Errors.txt (1.0 KB) Chap 7 Training Error Log.log (5.0 KB) Chap 8 Console Errors.txt (857 Bytes) Chap 8 Error Log.log (10.0 KB) Console messages and error logs are attached,

Hi @rfeigel,

I am not so sure about the error in chapter 7, but the one in chapter 8 reads like you are using the wrong version of TensorFlow (TensorFlow 2 instead of 1). Can you double-check that or, if you are unsure, share a screenshot of your Python Deep Learning Preferences page (File > Preferences > KNIME > Python Deep Learning)?

Marcel

Screenshot attached. I’m using Tensorflow 2, but don’t know how to change to Tensorflow 1

You could try to change the Library used for the “DL Python” scripting nodes from TensorFlow 2 to Keras. But this should only affect scripting nodes, not the Keras Network Learner or TensorFlow Network Executor nodes. Apart from that, your settings look good to me.

I did as you suggested and “updated” environments as well. Same error. You mentioned earlier I should be using Tensorflow 1. The Tensorflow environment I’m using is apparently 2. If I need to change, how do I do it? Thanks for your help.

Hi @rfeigel

can you please let me know in which workflow in chapter 7 you get the error?

Thank you
Kathrin

TensorFlow 1 is part of the Keras environment (which seems to be properly configured according to your screenshot), so there is nothing you need to change. The TensorFlow 2 environment (the bottom one in your screenshot) is only ever used by the TensorFlow 2 nodes and, if configured, by the DL Python scripting nodes. Not by any of the Keras/TensorFlow (1) nodes.

So, I do not really know what the problem might be right now. I downloaded and executed the workflow myself and it worked properly.
However, having another look at your error log suggests that it is the TensorFlow Network Executor that fails, not the Keras Network Learner – is that true? (Line: ERROR TensorFlow Network Executor 0:235:0:224 Execute failed: An error occured during execution of the deep learning network. See log for details. in Chap 8 Console Errors.txt). If so, could you try to:

  1. Execute the workflow up to (and excluding) the NMT Predictor component
  2. Open the NMT Predictor component (Right click on it > Component > Open)
  3. Open the configuration dialog of the leftmost contained TensorFlow Network Executor (the one labeled encode input sequences)
  4. Check if you can change the Back end entry on the Options tab of the configuration dialogue to something else (again, if you are unsure, you can also post a screenshot of that tab here)

I’m using the Training workflow.

I can’t get to the NMT Predictor component. The workflow errors out at the Keras Network Learner node.

Here’s a screenshot.

Hi @rfeigel,

testing the workflow of chapter 7 on windows I found out, why it might not work for you.

The problem occurs already in the File Reader node in the metanode Read and Extract Fairy Tales. Here the default encoding on Mac (OS (UTF-8)) reads in the text correctly. The default windows encoding on the other hand can’t read in the file correctly and you need to change the character encoding to UTF-8.

To do so you need to

  • click on the button “Advanced…” in the configuration window of the Files Reader node
  • open tab Character Encoding
  • select UTF-8

Thank you for bringing this up! I will also update the workflow on the hub, so it uses automatically the correct character encoding.

Also in chapter 8 the file reader uses the wrong encoding. Can you please try to change the encoding also here to UTF-8 and see whether it works?

Best
Kathrin

2 Likes

Dear Kathrin:

Changing the encoding worked perfectly on both models. Thanks very much.

2 Likes

Chapter 7 Sentiment Training model runs but throws this error at the Scorer node:

ARN Scorer 0:367 Ambiguous value “0” encountered. Preserving individual instances; consider to convert input columns to string

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.