-
Notifications
You must be signed in to change notification settings - Fork 80
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
[ graph ] Allow loss layer to be used in inference mode #2886
Open
skykongkong8
wants to merge
2
commits into
nnstreamer:main
Choose a base branch
from
skykongkong8:pr/graph/loss_label_comb
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[ graph ] Allow loss layer to be used in inference mode #2886
skykongkong8
wants to merge
2
commits into
nnstreamer:main
from
skykongkong8:pr/graph/loss_label_comb
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
skykongkong8
requested review from
myungjoo,
jijoongmoon,
again4you,
jaeyun-jung,
leemgs,
wooksong,
gichan-jang,
anyj0527,
lhs8928,
songgot,
jihochu,
DonghakPark,
SeoHyungjun,
baek2sm,
djeong20,
EunjuYang,
dkjung and
haehun
as code owners
January 20, 2025 01:52
skykongkong8
changed the title
[ graph ] Allow loss layer to be used in inference mode
[ WIP ] [ graph ] Allow loss layer to be used in inference mode
Jan 20, 2025
skykongkong8
force-pushed
the
pr/graph/loss_label_comb
branch
2 times, most recently
from
January 20, 2025 03:56
c6ec999
to
ce9615e
Compare
DonghakPark
approved these changes
Jan 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! especially Consider various case, add unittest and fix tflite export!! 👍
EunjuYang
approved these changes
Jan 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
skykongkong8
force-pushed
the
pr/graph/loss_label_comb
branch
from
January 20, 2025 08:07
ce9615e
to
f7a15c6
Compare
- Intention of the c5db575 commit was to completely remove the usage of loss and the label in inference. - However, there are cases where the loss layer is used in inference mode, such as the case of the loss layer being used as a metric. - Thus, when loss layer is given when the model is formulated, the model will always have the loss layer, and it will expect to have a label vector later on. - On the contrary, when the loss layer is not given, the model will not have the loss layer, and it will not expect to have a label vector later on. **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: skykongkong8 <ss.kong@samsung.com>
skykongkong8
force-pushed
the
pr/graph/loss_label_comb
branch
from
January 23, 2025 02:01
f7a15c6
to
43e0804
Compare
skykongkong8
changed the title
[ WIP ] [ graph ] Allow loss layer to be used in inference mode
[ graph ] Allow loss layer to be used in inference mode
Jan 23, 2025
- Current nntrainer inference mode does not consider label check as a mandatory process. **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: skykongkong8 <ss.kong@samsung.com>
skykongkong8
force-pushed
the
pr/graph/loss_label_comb
branch
from
January 23, 2025 04:33
43e0804
to
00df4de
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To summarize when inference mode,
Added TC will emit the output like below with model summary:
================================================================================ Layer name Layer type Output dimension Input layer ================================================================================ input0 input 1:1:1:256 -------------------------------------------------------------------------------- fully_connected0 fully_connected 1:1:1:1024 input0 -------------------------------------------------------------------------------- fully_connected1 fully_connected 1:1:1:1024 fully_connected0 -------------------------------------------------------------------------------- fully_connected2 fully_connected 1:1:1:1024 fully_connected1 -------------------------------------------------------------------------------- fully_connected3 fully_connected 1:1:1:100 fully_connected2 -------------------------------------------------------------------------------- mse0 mse 1:1:1:100 fully_connected3 ================================================================================
Self evaluation: