v147 · Linear Regression Demo

Linear Regression Demo

Build a tiny WebNN computation graph that evaluates a linear function y = w·x + b across a range of inputs. Adjust weight and bias, then run the graph — results are plotted and the raw tensor output is logged.

Checking for WebNN (navigator.ml)…
Graph parameters
Graph: y = 2.0·x + 1.0
WebNN: mul(x, w) → add(bias) → output
Output plot — y = w·x + b
Last x
Last y
Min y
Max y

see also

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗