Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenate melspec graph + basemodel graph #47

Open
kfengtee opened this issue Jan 31, 2024 · 3 comments
Open

Concatenate melspec graph + basemodel graph #47

kfengtee opened this issue Jan 31, 2024 · 3 comments

Comments

@kfengtee
Copy link

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.

@TheSeriousProgrammer
Copy link
Contributor

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

@kfengtee
Copy link
Author

kfengtee commented Feb 1, 2024

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

@TheSeriousProgrammer
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants