Skip to content

Conversation

@junseokShim
Copy link

@junseokShim junseokShim commented Dec 3, 2025

This PR adds ONE_HOT operator support to TensorFlow Lite Micro.

  • Ported ONE_HOT kernel from TensorFlow Lite to Micro:
    • tensorflow/lite/micro/kernels/one_hot.cc
    • tensorflow/lite/micro/kernels/one_hot.h
  • Added micro tests converted from Lite tests:
    • tensorflow/lite/micro/one_hot_test.cc
  • Verified with:
    • make -f tensorflow/lite/micro/tools/make/Makefile test_one_hot_test
    • clang-format and cpplint.py on modified files

This intends to address #3078.

bug=fixes #3078

@junseokShim junseokShim requested a review from a team as a code owner December 3, 2025 11:15
@google-cla
Copy link

google-cla bot commented Dec 3, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@junseokShim
Copy link
Author

@googlebot I signed it!

@junseokShim junseokShim force-pushed the feature/port_onehot_operator branch from 26628b8 to 8ecac95 Compare December 3, 2025 11:46
@ddavis-2015
Copy link
Member

@junseokShim Please add a line at the end of your PR description above: bug=fixes #3078. The CI will not pass without this line in the description.

@ddavis-2015
Copy link
Member

@veblush Before this PR can be accepted, the LiteRT code will need to be updated to separate out the parameter parsing for ONE_HOT here . Operators that have individual parameter parsing methods are in the same file, located near the beginning of the file.

@ddavis-2015
Copy link
Member

@junseokShim This does not seem to be a completed PR. Please adhere to the requirements as listed in issue #3078.

@junseokShim
Copy link
Author

@junseokShim This does not seem to be a completed PR. Please adhere to the requirements as listed in issue #3078.

OK, I will double-check the detailed requirements and make sure they are reflected.

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.

port "oneHot" operator to tensorflow lite micro

3 participants