tractjs
tractjs copied to clipboard
NNEF integration
tract now supports NNEF in https://github.com/snipsco/tract/pull/340.
- [x] Check size reduction by replacing ONNX and TF with NNEF and building the package.
- [ ] If the size reduction is significant (@kali sees 25%!) we should create a separate package
@tractjs/nnef
for NNEF support. It follows that ONNX and TF should also be split this way into@tractjs/onnx
and@tractjs/tf
. See the way TF.js does splitting into packages.
This and https://github.com/bminixhofer/tractjs/issues/12 should get us below 1MB!
@kali I got around to checking this now:
Current WASM size: 4.7MB, 1.0MB gzipped
WASM size with tract_onnx
and tract_tensorflow
replaced by tract_nnef
: 2.8MB, 680KB gzipped!
So a huge decrease, and definitely worth implementing in tractjs.
Ha thanks, that's great news :) Working on the scan op support right now.