EfficientWord-Net icon indicating copy to clipboard operation
EfficientWord-Net copied to clipboard

Concatenate melspec graph + basemodel graph

Open kfengtee opened this issue 2 years ago • 3 comments

Hi, first of all, thank you for sharing this awesome work!

I noticed that the first model version was divided into two separate graphs logmelcalc.tflite and baseModel.tflite. Wondering if there is any rationale behind this?

Context: I am considering merging these two graphs into a single .tflite file for easier management. So wanted to check if this is feasible and if there are any potential issues I should be aware of.

kfengtee avatar Jan 31 '24 10:01 kfengtee

The recognition model fundamentally used now is built with pytorch and the export is in onnx.

Therefore I am not sure if both can be merged reliably

Moreover the logmelcalc.tflite has a small bug due to which the graph cannot process more than 1 sample at a time i.e batch size should be 1

Due to the same reasons both the base model and the preprocessing graphs where not merged together

TheSeriousProgrammer avatar Jan 31 '24 14:01 TheSeriousProgrammer

I see, thanks for the explanation! Hmm yeah I think merging the new onnx model with tflite graph will be very tricky.

Do you still keep a copy of the script/weights used to convert the old Tensorflow model (e.g: in SavedModel/Keras/etc format/etc) into .tflite files (for both logmelcalc.tflite and baseModel.tflite)? I'm keen to give it a try and see how to make logmelcalc.tflite process in batch + merge with the old base model.

p/s: understand that the new pytorch/onnx model performs much better than the old tensorflow model, but the size is a bit too huge + personally inclined to use TFLite as the edge inference engine, hence still interested to play around with the old version first haha

kfengtee avatar Feb 01 '24 09:02 kfengtee

hi unfortunately I dont have the old tensorflow wieghts (thanks to me not keeping backups during my undergrad days), but soon I am planning to train a new tflite model with substantially smaller size and better performance, will also make sure that from training everything is reproducible, thanks for the patience

TheSeriousProgrammer avatar Sep 03 '24 05:09 TheSeriousProgrammer