Open
Description
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js):
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20.04
- TensorFlow.js installed from (npm or script link): tfjs=v3.14.0, tfjs-tflite=v0.0.1-alpha.8, tensorflow (for conversion of saved model to tflite)=v2.8.0
- Browser version: Chrome v98
I'm trying to get the JAX-MD molecular dynamics library working in the browser, and I've run into this error after converting a simple model from JAX to tf with jax2tf, and then from tf to tflite with tf.lite.TFLiteConverter.from_saved_model
. Here's the notebook that does the conversions.
When running the model in the browser I get this error:
tflite_web_api_cc_simd_threaded.js:9 Uncaught RuntimeError: Aborted(To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking). Build with -s ASSERTIONS=1 for more info.
at abort (tflite_web_api_cc_simd_threaded.js:9:12100)
at __dlsym_js (tflite_web_api_cc_simd_threaded.js:9:30255)
at tflite_web_api_cc_simd_threaded.wasm:0xc09c7
at tflite_web_api_cc_simd_threaded.wasm:0x1048e4
at tflite_web_api_cc_simd_threaded.wasm:0x3272b7
at tflite_web_api_cc_simd_threaded.wasm:0x3cdd3
at Function.TFLiteWebModelRunner$CreateFromBufferAndOptions [as CreateFromBufferAndOptions] (eval at new_ (tflite_web_api_cc_simd_threaded.js:9:53171), <anonymous>:10:10)
at $jscomp.generator.Engine_.program_ (tf-tflite.js:7725:40)
at $jscomp.generator.Engine_.nextStep_ (tf-tflite.js:319:26)
at $jscomp.generator.Engine_.next_ (tf-tflite.js:302:134)
Standalone code to reproduce the issue
- Please open this link and view the browser console: https://josephrocca.github.io/jax-md-web-test/minimal/tflite.html
- Here's the source for that page: https://github.com/josephrocca/jax-md-web-test/blob/main/minimal/tflite.html
Additional notes
I noticed that there's a StackOverflow question about this (same error as above when trying to use tfjs-tflite with some models) with about 100 views as of writing so it seems that there are others bumping into this too. I wasn't able to find an existing issue in this repo for it though.