ARM-software / ML-examples

Arm Machine Learning tutorials and examples

Home Page:https://developer.arm.com/technologies/machine-learning-on-arm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while running test_tflite.py

mehreenjabeen opened this issue · comments

Hi,
while running test_tflite.py, I got the below error
"ValueError: Cannot set tensor: Dimension mismatch. Got 3920 but expected 490 for dimension 1 of input 37."

Command i ran:
python test_tflite.py --tflite_path ../Pretrained_models/DS_CNN/DS_CNN_S/ds_cnn_s_quantized.tflite

Hi there,

You need to set the parameters to match the model being used as DNN and DS_CNN have different input features. The default values do not match the pretrained models which use those in the train_commands.txt file. The following should hopefully work for you:

python test_tflite.py --tflite_path ../Pretrained_models/DS_CNN/DS_CNN_S/ds_cnn_s_quantized.tflite --dct_coefficient_count 10 --window_size_ms 40 --window_stride_ms 20

It worked. Thanks Richard.