Closed a-sully closed 7 months ago
With only medium confidence:
input.shape()[options.axis]
input.shape()[1]
(given that the example assumes "nchw")batchSize
(i.e. input.shape()[0]
)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.
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?batchNormalization
example: https://github.com/webmachinelearning/webnn/blob/9f0f45a80da91b5d10913d89be20707cef39cfc1/index.bs#L1563-L1572instanceNormalization
example: https://github.com/webmachinelearning/webnn/blob/9f0f45a80da91b5d10913d89be20707cef39cfc1/index.bs#L3608-L3617lstm
example (3x): https://github.com/webmachinelearning/webnn/blob/9f0f45a80da91b5d10913d89be20707cef39cfc1/index.bs#L4107gru
example (2x): https://github.com/webmachinelearning/webnn/blob/9f0f45a80da91b5d10913d89be20707cef39cfc1/index.bs#L3151-L3157