UNPKG

@shumai/shumai

Version:

A fast, network-connected, differentiable tensor library for TypeScript (and JavaScript). Built with bun + flashlight for software engineers and researchers alike.

7 lines (5 loc) 140 B
import * as sm from '../tensor' export function mse(a: sm.Tensor, b: sm.Tensor) { const diff = a.sub(b) return diff.mul(diff).mean() }