-
Notifications
You must be signed in to change notification settings - Fork 159
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
[onert] Introduce BiasInsertionPass #13842
[onert] Introduce BiasInsertionPass #13842
Conversation
This commit introduces BiasInsertionPass to insert bias for training in case bias is optional input. ONE-DCO-1.0-Signed-off-by: ragmani <[email protected]>
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
void run() final; | ||
|
||
public: | ||
void visit(const ir::operation::FullyConnected &node) override; |
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.
Should we have to insert bias into each node?
I'd like to review this PR, But I feel hard to understand the background 🥲
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.
Sometimes TFLite converter may generate a inference model that does not have bias input(i.e. optional input) when the bias data has all zero values. It's reasonable in inference because there is no reason to add zero values. But, in training, bias is necessary because bias needs to be trained and updated.
As a result, we need to insert bias input if a model to be trained does have bias input.
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.
@zetwhite
Thanks for your advise offline. I made a note about that at #13808 (comment).
We concluded that we assumed onert only supports training for pre-trained models. So this PR is not necessary anymore. |
This commit introduces BiasInsertionPass to insert bias for training in case bias is optional input.
ONE-DCO-1.0-Signed-off-by: ragmani [email protected]