Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Error happened when using WASM/WebGL backend of tfjs 2.0.1 to run Image Classification example. #1331

Open
BruceDai opened this issue Aug 11, 2020 · 5 comments · Fixed by #1332
Assignees

Comments

@BruceDai
Copy link
Contributor

Error: The highest priority backend 'wasm' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods

@NALLEIN @akineeic please help investigate and fix it, thanks.

@akineeic
Copy link
Contributor

The tfjs-backend-wasm module try to find simd binary when I specify a wasm file. I open an issue to upstream and this seems to an issue will be fixed in next release. This issue can be temporarily fixed by adding code as following to webpack the simd binary:
import simdPath from '../../../node_modules/@tensorflow/tfjs-backend-wasm/dist/tfjs-backend-wasm-simd.wasm';

Or we can just back to the old version and wait for their new release.

@huningxin
Copy link
Contributor

Thanks @akineeic , please send a PR to implement the workaround for current release. We can upgrade to the next release when it is available.

@ibelem
Copy link
Member

ibelem commented Aug 18, 2020

@BruceDai please track the upstream bug status.

@akineeic
Copy link
Contributor

I tried with the newest version(2.3.0) of tfjs-beckend-wasm but some errors still appeared. We need to wait for the next release as the developer said. Track with the upstream issue.

@BruceDai
Copy link
Contributor Author

@akineeic Thanks for this information.

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

Successfully merging a pull request may close this issue.

5 participants