Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[op] allow dtype secification for onehot op #6781

Merged
merged 2 commits into from
Aug 22, 2022
Merged

[op] allow dtype secification for onehot op #6781

merged 2 commits into from
Aug 22, 2022

Conversation

pyu10055
Copy link
Collaborator

@pyu10055 pyu10055 commented Aug 22, 2022

As reported in this bug, tfjs onehot op only output 'int32' tensor, which does not match to the TF onehot op specification.
This PR will add support for dtype specification for onehot op, will add converter changes in another PR.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

Copy link
Collaborator

@Linchenn Linchenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

Reviewable status: :shipit: complete! 2 of 1 approvals obtained (waiting on @pyu10055)


tfjs-core/src/ops/one_hot.ts line 48 at r1 (raw file):

 * @param offValue A number used to fill in the output when the index does
 *     not match the location.
 *

Could you add a comment here?

@pyu10055 pyu10055 merged commit e2b6a9d into master Aug 22, 2022
@pyu10055 pyu10055 deleted the onehot_dtype branch August 22, 2022 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants