Skip to content

Conversation

@pyu10055
Copy link
Collaborator

@pyu10055 pyu10055 commented Aug 22, 2022

parse the T param from the op definition and call tfjs-core onehot api accordingly.
fix #6773
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.

Could you add a param comment for dtype, at

* @param indices `tf.Tensor` of indices with dtype `int32`. Indices must
* start from 0.
* @param depth The depth of the one hot dimension.
* @param onValue A number used to fill in the output when the index matches
* the location.
* @param offValue A number used to fill in the output when the index does
* not match the location.

Copy link
Collaborator Author

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

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

Thanks, added.

Reviewable status: 0 of 1 approvals obtained (waiting on @jinjingforever)

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.

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

@pyu10055 pyu10055 merged commit 9a580c5 into master Aug 23, 2022
@pyu10055 pyu10055 deleted the onehot_op branch August 23, 2022 16:58
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.

Error: Argument 'x' passed to 'conv2d' must be float32 tensor, but got int32 tensor, even if the input tensor is forced to tf.float32

3 participants