webml-polyfill icon indicating copy to clipboard operation
webml-polyfill copied to clipboard

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

Open BruceDai opened this issue 5 years ago • 5 comments

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.

BruceDai avatar Aug 11 '20 06:08 BruceDai

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.

akineeic avatar Aug 12 '20 01:08 akineeic

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

huningxin avatar Aug 12 '20 01:08 huningxin

@BruceDai please track the upstream bug status.

ibelem avatar Aug 18 '20 06:08 ibelem

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.

akineeic avatar Aug 27 '20 13:08 akineeic

@akineeic Thanks for this information.

BruceDai avatar Aug 28 '20 01:08 BruceDai