MoonBit neural network inference operators for small, portable deployments.
import {
"Ankaluoer/moon-tensor" @tensor,
}///|
fn main {
let input = [1.0, 2.0, 3.0]
let activated = @tensor.relu(input)
println(activated)
let logits = [1.0, 2.0, 3.0]
let probs = @tensor.softmax(logits)
println(probs)
}moon testmoon build --target wasm-gc| Runtime or library | Approximate artifact size |
|---|---|
| moon-tensor wasm-gc demo | 10 KB |
| ORT-Web | 25 MB |
| TensorFlow.js core-style bundles | 300-500 KB |
MoonBit neural network inference operators for small, portable deployments.