webmachinelearning / webnn

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

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

Closed a-sully closed 7 months ago

a-sully commented 7 months 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 7 months ago

With only medium confidence:

inexorabletash commented 7 months 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.