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

[WASM] Temporary fix of tfjs-bankend-wasm 2.0.1 init issue #1332

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/nn/tfjs/TfjsModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Graph from '../GraphUtils';
import * as utils from '../utils';
import CyclicProfiler from '../instrument';
import wasmPath from '../../../node_modules/@tensorflow/tfjs-backend-wasm/dist/tfjs-backend-wasm.wasm';
import simdPath from '../../../node_modules/@tensorflow/tfjs-backend-wasm/dist/tfjs-backend-wasm-simd.wasm';
import {setWasmPath} from '@tensorflow/tfjs-backend-wasm';
import "@tensorflow/tfjs-backend-webgl";

Expand Down Expand Up @@ -47,7 +48,7 @@ export default class TfjsModel {
}
return '';
}
setWasmPath(_fixWasmPath(wasmPath));
setWasmPath(null, {'tfjs-backend-wasm.wasm': _fixWasmPath(wasmPath)});
await tf.setBackend('wasm');
};
} else {
Expand Down