Skip to content

Behavior when there are NaNs in argmin/max inputs #811

@philloooo

Description

@philloooo

Hi!
I have a question re: how backends handle NaNs in the inputs.

I found that for argmin/argmax when there are NaNs in the input, Core ML most of the time returns a wrong min/max index pointing to a number that's not the min/max. On tflite/dml though, they ignore the NaNs and return the correct index pointing to the max/min number.
This might be a bug, or may be working as expected on Core ML? @mwyrzykowski

On the WebNN side, do we think
a. it's ok to expect the backends behave strangely when there are NaNs? ( if we consider NaNs are unexpected invalid data)
b. or we expect consistent handling across backends for inputs with NaNs ( and spell them out in the spec)?

@fdwr @huningxin might have some thoughts?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions