Crates.io | wasm-tensorflow-tfjs-core |
lib.rs | wasm-tensorflow-tfjs-core |
version | 0.1.1 |
source | src |
created_at | 2023-11-30 23:12:27.596259 |
updated_at | 2023-12-07 05:45:32.546901 |
description | Rust WASM Bindings for the npm package `@tensorflow/tfjs-core` |
homepage | https://github.com/ChocolateLoverRaj/wasm-tensorflow-tfjs-core |
repository | https://github.com/ChocolateLoverRaj/wasm-tensorflow-tfjs-core |
max_upload_size | |
id | 1054575 |
size | 3,028 |
What if you wanted to do this in JavaScript?
import '@tensorflow/tfjs-backend-webgl'
import { setBackend } from '@tensorflow/tfjs-core'
await setBackend('wegbl')
Just add this crate and you can do it in Rust!
// Somehow import '@tensorflow/tfjs-backend-webgl'
use wasm_tensorflow_tfjs_core::{set_backend, BackendName};
let result = set_backend(BackendName::Webgl).await;