Errors in tflite_model.ts for text classification tasks
Bug 1: Line 200
const modelInputShape = modelInput.shape.split(',').map(dim => Number(dim));
modelInput.shape is a string with ',' as a separator for thousands. For tflite text classification models using 'average_word_vec',
modelInput.shape is "1,256" modelInputShape is [1,256]
This results in "Input tensor shape mismatch error"
Bug 2: Line 251 This is probably an issue/bug with the way text classification models are getting created with tflite model maker
tflite text classification models have their modelInput.shape property set to "1,256". However, that doesn't seem to be correct as the modelInputBuffer getting calculated at line 251 is only 256.
In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thanks!
Closing as stale. Please @mention us if this needs more attention.