frugally-deep: Test fails during load
Hi Tobias, thanks for this great library!
I’m having problems with a model and I’m not sure how to debug it.
I’m using the functional API with the following layer types: Dense, Conv1D, Concatenate, Embedding and Flatten. The conversion of the model runs without any problem, but when I’m loading in it I get the following error:
Running test 1 of 1 ... libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: size_dim_5, size_dim_4, height and width dimension must be 1, but shape is '[(1, 1, 1, 200, 20)]'
I can set false to the test, but then I get the exception when running a prediction.
I’ve run it with lldb and the problem seems to be a mismatch in the output layer dimension (which is supposed to have 2 neurons). The described shape [(1,1,1,200,20)] matches one of the inputs’ shape (I’m using 5 input tensors).
I’m not really sure how to debug this. Any idea?
The Keras model and the fdeep conversion can be found in this file.
I’m using the last commit of this repo. Keras and Tensorflor versions:
Using TensorFlow backend.
2.2.4
$ python3 -c 'import tensorflow as tf; print(tf.__version__)'
1.12.0
Thanks in advance!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 16 (11 by maintainers)
Commits related to this issue
- Generate meaningful errors in case embedding layers are at an invalid position #135 — committed to Dobiasd/frugally-deep by Dobiasd 5 years ago
We are running different classifiers on mobile devices as part of an intrusion prevention system. Recently, we started to use neural networks for a few of them (malware and phishing detection mostly).
It’s an awesome tool and I thank you one more time for coding it.
I’ve just checked and it’s fully functional.
You are amazing. Best open source response ever. How can I buy you a beer?