Created
January 9, 2020 18:03
-
-
Save GantMan/833cd975b651ec454ba806af0f335fd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TensorFlow required | |
import * as tf from '@tensorflow/tfjs' | |
import { setWasmPath } from '@tensorflow/tfjs-backend-wasm' | |
// Default path without setWasmPath is /static/js/tfjs-backend-wasm.wasm | |
setWasmPath('/tfjs-backend-wasm.wasm') | |
// We can now force a WASM backend and print it for proof! | |
tf.setBackend('wasm').then(console.log('The Backend is', tf.getBackend())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment