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

Nnef dumper #340

Merged
merged 50 commits into from
Aug 14, 2020
Merged

Nnef dumper #340

merged 50 commits into from
Aug 14, 2020

Conversation

kali
Copy link
Collaborator

@kali kali commented Aug 3, 2020

No description provided.

@kali kali merged commit c51e627 into main Aug 14, 2020
@kali
Copy link
Collaborator Author

kali commented Aug 14, 2020

Hey, @bminixhofer I'm curious to see if you can check the impact of the new nnef based approach (and at least if you manage to get it to work) with tractjs :) I see a ~25% code size reduction on my side.

I have plans for more code reduction, but I think this is an interesting milestone.

See if https://github.com/snipsco/tract/tree/main/examples/nnef-dump-mobilenet-v2 can help.

@bminixhofer
Copy link
Contributor

bminixhofer commented Aug 15, 2020

Exciting! I'll try it. You are referring to this NNEF? Never heard of it before.

Also, adding it to tractjs is not trivial (since it needs the equivalent of rust features, which is of course not that easy in the JS ecosystem) but I think I can get it to work via TF.js style splitting in multiple packages.

But aside from that I can quickly replace TF and ONNX with NNEF to just check the size reduction.

@kali
Copy link
Collaborator Author

kali commented Aug 15, 2020

yes that's the one :) consider tract_nnef to be alpha at this stage, i may need to change the api a bit, and the format extension are not 100% stable. but i'm curious to see how smaller a package it will give un with tract.js. It should help with startup time too as most of the decluttering is done beforehand. It does not solve the dynamic sizing issue, but this may be coming next.

@kali
Copy link
Collaborator Author

kali commented Aug 15, 2020

@bminixhofer just so you know, stay in the image categorizer field for now. recurring are coming, probably next week.

@kali kali deleted the nnef-dumper branch August 17, 2020 05:52
@kali
Copy link
Collaborator Author

kali commented Aug 19, 2020

@bminixhofer FYI, "your" model (as in onnx/test_cases/byte_sb_bidi_lstm) now works once dumped and reloaded.

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

Successfully merging this pull request may close these issues.

None yet

2 participants