From 60e183c618fe318cec5438e61987a21642d65352 Mon Sep 17 00:00:00 2001 From: akineeic Date: Wed, 12 Aug 2020 09:54:47 +0800 Subject: [PATCH] [WASM] Temporary fix of tfjs-bankend-wasm 2.0.1 init issue --- src/nn/tfjs/TfjsModel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nn/tfjs/TfjsModel.js b/src/nn/tfjs/TfjsModel.js index 28e34c364..fbd4fbf47 100644 --- a/src/nn/tfjs/TfjsModel.js +++ b/src/nn/tfjs/TfjsModel.js @@ -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"; @@ -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 {