Discrepancies with maxPool2d padding behavior
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 12/100
- Tipo de issue
- Documentación
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Área
- api, machine-learning
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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?
- Lenguaje dominante
- Bikeshed
- Estrellas
- 566
- Forks
- 72
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de webmachinelearning/webnn
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
webmachinelearning/webnn#970 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
webmachinelearning/webnn#968 · 2 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
webmachinelearning/webnn#967 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
webmachinelearning/webnn#966 · 5 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
webmachinelearning/webnn#965 · 6 comentarios ·
Todos los issues de webmachinelearning/webnn
Issues similares
-
date_time, url_encode, html_escape, to_unix_time, contains_all and contains_any panic when called without argumentsPosiblemente ocupada @antcybersec la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
projectdiscovery/dsl#372 ·
Los mantenedores suelen responder en 1 día
-
intercepted.rb crashes on an optional positional argument when the method also takes keywordsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
yegor256/intercepted#128 ·
-
jinmantiantang-v1.6.63章节编号问题AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
keiyoushi/extensions-source#20650 ·
Los mantenedores suelen responder en 1 día
-
feat(plan): support convertorLabels and convertorAffinity in Plan resourcePosiblemente ocupada @AmenB la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
RedHatQE/openshift-python-wrapper#2849 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
libnativeapi/nativeapi#21 ·