Discrepancies with maxPool2d padding behavior
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 12/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 領域
- api, machine-learning
調査の方向性
The issue asks the working group to decide how maxPool2d should treat a pooling window that covers only padding, with TFLite returning 0 and CoreML returning -Infinity. Start by reading the four-comment thread to see where the discussion stalled, then the maxPool2d section of the WebNN spec. Done means a recorded working-group decision on the padding-only case, followed by a spec change. A newcomer can't finish this alone, so ask in the thread before writing anything.
索引モデルが issue の本文から書いたものです。
説明
When implementing and testing maxPool2d with roundingType: "ceil", we encountered a case where different backends produce inconsistent results for windows that cover only padding elements. The WebNN specification does not seem to explicitly define the expected behavior for this edge case.
Test Case
Input Shape: [1, 2, 5, 5]
Window Dimensions: [3, 3]
Strides: [3, 3]
Padding: [1, 1, 1, 1] (Symmetric)
Rounding Type: 'ceil'
With these parameters, the output shape is [1, 2, 3, 3]. The windows in the last row and last column cover only padding elements (since the valid input is 5x5 and padding expands it to 7x7, but the stride of 3 moves the last window to start at index 6, covering indices 6, 7, 8 which are padding or outside).
Observations
- TFLite Backend: Returns 0 for these empty windows.
- CoreML Backend: Returns -Infinity for these empty windows.
If padding elements are strictly ignored for maxPool2d (to prevent padding values from becoming the maximum), then a window covering only padding elements contains no valid elements.
Mathematically, the maximum of an empty set is defined as $-\infty$. CoreML's behavior is consistent with this interpretation.
TFLite's behavior suggesting it treats padding as 0 or defaults to 0 when no valid elements are present.
Questions for the Working Group
- What is the expected behavior when a pooling window covers only padding elements for maxPool2d?
- Should the spec clarify whether padding elements are treated as $-\infty$ (ignored) or if there is a fallback value like 0 when no valid input elements are in the window?
- 主要言語
- Bikeshed
- スター
- 566
- フォーク
- 72
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
webmachinelearning/webnn のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
webmachinelearning/webnn#970 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
webmachinelearning/webnn#968 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
webmachinelearning/webnn#967 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
webmachinelearning/webnn#966 · コメント 5 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
webmachinelearning/webnn#965 · コメント 6 件 ·
webmachinelearning/webnn の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
hyperledger/fabric-x-orderer#1409 ·
メンテナーはふだん 3 日以内に返信
-
fixed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
firefly-iii/firefly-iii#13150 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信