Demo loading a tfjs graph model synchronously from wasm. This uses a new synchronous http api. It's not efficient since it has to load each file one at a time, and it blocks the main thread while loading. It could be run in a webworker, but it still would only load one file at a time.
cc/main.cc
is the main wasm entrypoint.web/index.ts
loadsmain.cc
and is the main js entrypoint.web/http_sync.ts
is a synchronous tfjs IO handler that loads the model using a synchronous XMLHttpRequest.
git clone --recurse-submodules https://github.com/mattsoulanille/wasm_load_tfjs_test.git
yarn serve
Check the javascript console for results. The network tab shows the issue with synchronous loading, where only one file can be loaded at a time.