webmachinelearning / webnn

🧠 Web Neural Network API
https://www.w3.org/TR/webnn/
Other
341 stars 42 forks source link

Remove use of `null` as parameter to `reshape` in code examples #667

Closed a-sully closed 1 month ago

a-sully commented 1 month ago

388 proposed removing this capability and the corresponding PR merged in #601, but forgot to update the code examples!

What should the null value be in each of these examples?

inexorabletash commented 1 month ago

With only medium confidence:

inexorabletash commented 1 month ago

As an aside, on my wish list is redoing the decomposition code so each example explicitly gives the inputs/args/options/etc just like the method

function opname(builder, input, [inputN, ...] [args, ...] options) { 
    ... 
};

... so that it's more obvious where things like batchSize come from.