Skip to content

Need for type casting? #284

Description

@wacky6

This came up during review for softmax implementation https://chromium-review.googlesource.com/c/chromium/src/+/3856752/comments/267c926c_b14af87f

Softmax will likely only support float point types: #283

Currently, the spec provides no way to convert between data types, this might make it hard to use softmax with certain computation graphs.

This could impact models doing integer computations (e.g. image recognition models that takes in RGB24 image represented by uint8), and returns softmax-ed predictions (e.g. one-hot encoding).

For example, the following graph:

   Input (uint8)
-> matmul (uint32)
-> softmax

Perhaps WebNN needs a type-casting function?

In ML frameworks:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions