-
Notifications
You must be signed in to change notification settings - Fork 59
Description
This issue was raised as @fdwr's below comment for reviewing Chromium CL-5382118.
axes=[0,1]is an odd one, and I wonder the history behind it (decided before I joined). Some other ML libraries simply treat axes as numbers (no associated semantics to any particular dimensions), but WebNN limits them to[0,1],[1,2],[2,3]; and while theaxes=[1,2]andaxes=[2,3]uses are obvious (for NHWC and NCHW tensors respectively), the[0,1]scenario makes me go hmm, because if the semantic interpretation of the input tensor is NHWC, then it would mean resampling the batch and height (but not the width 🙃), which wouldn't make any sense; whereas if the semantic layout of the input was NCHW, then it would mean simultaneously resampling the batch dimension (useful for replication) and expanding the channel count, which can make sense. However, if resampling NC in NCHW is useful, then resampling NC in NHWC should be deemed useful too, butaxes=[0,3]is currently disallowed by the spec. 🤔
/cc @fdwr @huningxin @a-sully, PTAL, thanks.