Skip to content

Instantly share code, notes, and snippets.

Created January 9, 2020 18:03
What would you like to do?
// 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
// 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