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

[ONNX FE] Add SoftmaxCrossEntropyLoss operator to ONNX Frontend #28682

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AJThePro99
Copy link

This pull request implements the SoftmaxCrossEntropyLoss operation for the ONNX frontend in OpenVINO, supporting opset 12 and opset 13. It includes new header and source files to define and implement the operation.

Ticket #20547

New operation implementation:


TODO

  • 1. Create softmax_cross_entropy_loss.cpp & softmax_cross_entropy_loss.hpp
  • 2. Add implementation of SoftMaxCrossEntropyLoss for opset_12 & opset_13
  • 3. Register the function using ONNX_OP() macro
  • Creating test models within ONNX Models directory
  • Added test cases covering all use cases here
  • Check Python xfailed tests for added functionality
  • Final code formatting to adhere to OpenVINO codebase standards

P.S.: I'm very new to contributing to large codebases, and I want to know if my work meets the standards and most of all, is what's expected!

As a new contributor, I would really appreciate your guidance on the following:

  1. Does the implementation meet OpenVINO standards?
  2. Are there additional edge cases or test scenarios I should include? (Excluding TODOs)
  3. How can I improve code readability, efficiency, or maintainability?

@github-actions github-actions bot added the category: ONNX FE OpenVINO ONNX FrontEnd label Jan 26, 2025
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Jan 26, 2025
@AJThePro99
Copy link
Author

Hi @gkrivor
I’ve created a draft pull request for the implementation of SoftmaxCrossEntropyLoss. Since I’m new to contributing to OpenVINO, I’d appreciate it if you could take a look and let me know if I’m on the right track. Let me know if there are any changes or additional requirements I should address. Thanks for your time!

@AJThePro99 AJThePro99 marked this pull request as ready for review January 26, 2025 16:21
@AJThePro99 AJThePro99 requested a review from a team as a code owner January 26, 2025 16:21

const auto scores = inputs[0];
const auto labels = inputs[1];

Copy link
Member

Choose a reason for hiding this comment

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

I think weights are also needed according to the spec. Please check.

@AJThePro99
Copy link
Author

Hello!
I'd like to know if there exists a way to build the components of only the onnx frontend instead of the entire project src/frontends/onnx

It does have a CMakeLists.txt file, so I'm wondering if I could save time by doing that.
Or, does it not work that way?

@AJThePro99 AJThePro99 marked this pull request as draft January 27, 2025 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: ONNX FE OpenVINO ONNX FrontEnd ExternalPR External contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants