-
Notifications
You must be signed in to change notification settings - Fork 83
[ graph ] Allow loss layer to be used in inference mode #2886
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
base: main
Are you sure you want to change the base?
[ graph ] Allow loss layer to be used in inference mode #2886
Conversation
c6ec999
to
ce9615e
Compare
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!! 👍
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
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 <[email protected]>
f7a15c6
to
43e0804
Compare
- 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 <[email protected]>
43e0804
to
00df4de
Compare
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days. |
It seems that this PR is tagged |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days. |
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: