[scripts] Potential bug in generate_output during create_stateful_dataset
escorciav opened this issue · comments
Hi guys,
Thank you for sharing your work. It is self-contained and easy to read.
The logic used in the function generate_output is a little bit confusing to me. This line appends the index of the label into output
but the else case appends the label into output
.
I noticed that the output might end up being something like ['none', 2, 2, 'none', 'none']
. This input generated an error with the function to_categorical.
Disclaimer: I haven't run the code from scratch. Feel free to close the issue, if you are sure about the logic of the if statement.
Hi @escorciav,
You were right. It seems that writing a refactor of the code after the finish I change the function in a buggy way. It is already fixed it in this commit 32581d4. I have also shown a demonstration of the correct behavior in this notebook.