I am working through example “10_Generate_Product_Names_With_LSTM” in the example library. This is a wonderful example and I would encourage all to work through it.
When I want to change it to test my understanding of it all by loading a CSV file with only a 100 records instead of the much larger set that is read directly from a KNIME ‘table’ it all goes well.
It goes well until the “TensorFlow Network Executer” on the Deployment workflow.
Differences I see:
• Under the configuration settings (of the first instance of TensorFlow Network Executer) of the Input I can see that the order of inputs changed although I did not do so explicitly
• I can also see that the outputs are different, one is not there
• I can see that the ‘variable’ (not even sure this is the right term for it) [?]state 10 has this question mark in it, which I think is directly linked to my problems. If I click on it, it evaporates into thin air without a warning.
• The output table no longer contains the column as can be seen below
• The new data I am loading is not anything weird, just the counting words one, two, three….but in my own language where not each number is described by one word as in English.
• I am also not sure why there is a second instance of the TensorFlow Network Executer Node
• The second one is not firing up, but it is the former that is causing the trouble
• I just want to mention that I get very much the same behaviour with the original dataset if I stop the learning before it is completed in the Keras Network Learner node; I was wondering why it would allow me to stop something and export half a model that would never work
for me it looks like the first TensorFlow Network Executor doesn’t output the first hidden state any more.
To change this you can go into the configuration window of the first TensorFlow Network Executor node, scroll to the bottom and click on the “add output” button. You should be able to select lstm_1/while/Exit2:0. Next, please make sure to select “To List of Number(double)” as conversion type and state 1 as the “Output column prefix”.
Below you can find an answer to your other great questions inline:
• I am also not sure why there is a second instance of the TensorFlow Network Executer Node
The example works on character level (not word level). Based on the output of the first executor node we predict the first character. Then we start a loop. In each iteration we predict the next character. In this blog post we describe the different steps https://www.datanami.com/2019/04/04/product-naming-with-deep-learning/. Please let me know in case of any further questions.
• The second one is not firing up, but it is the former that is causing the trouble
The second one is not working because it misses the first hidden state as input. Adding the output state should fix this problem.
• I just want to mention that I get very much the same behaviour with the original dataset if I stop the learning before it is completed in the Keras Network Learner node; I was wondering why it would allow me to stop something and export half a model that would never work
Hm that’s strange. I just tried to reproduce this problem, but for me it works all fine. Did this happen only once or can you reproduce the problem? If yes, can you please share your workflow with the trained model with me?
Regarding the ‘TensorFlow Network Executor’ firstly. I have done that before, but that does not fix my problem. Also things does not look like the template example anymore.
The order of the output variables have changed and it looks like this now.
You can see the one I added end of “4:0” which is different than what you suggest.
Furthermore I have noticed now that the first notable difference occurs after the 'TensorFlow Network Reader". The Network is defined in this way, notably the order of the input variables are different. Starting with Input 3
Would you mind either uploading your workflow to the KNIME Hub or exporting and attaching it to this thread? Then I could have a quick look and try to fix it.
For me it still looks like the column state 10 is missing.
Can you please check whether the first TFNE has an output column state 10. If yes can you check in addition whether the Recursive Loop Start node has an output column state 10?
Thanks will check. Also wanted to upload the KNIME workflow here, but it was to big. I have not uploaded anything to the hub but will do if we do not get traction quickly. I know it is easier for you.
To answer your question “Can you please check whether the first TFNE has an output column state 10. If yes can you check in addition whether the Recursive Loop Start node has an output column state 10?”
There is no State 10 in the output. That state is definitely missing and I dont know how to add it.
As you can see above the strange [?] state 10 ( I would say, not known), but even more worrying the next input has nothing included (since state is not known).
Are you really sure you changed nothing after I sent you that example?
But I think I know why you are getting the warning. I assume you are trying to change the setting after running in into the error. This means in the second iteration. Please try to reset your loop (this means the loop start node), make the changes and try to execute.