This pr add a param to control whether to apply dropouts in the attention and hidden layers in Bert. Previously the dropouts are not applied.
Fixes # (issue)
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
List all changes
Please list all changes in the commit.
Added param use_bert_dropout to control this behavior, defaults to False to keep the same default behavior
Modified logic in bert_model
Added a Bert test in test_run_detext.py
Testing
local test
Test Configuration:
Firmware version:
Hardware:
Toolchain:
SDK:
Checklist
[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
Description
This pr add a param to control whether to apply dropouts in the attention and hidden layers in Bert. Previously the dropouts are not applied.
Fixes # (issue)
Please delete options that are not relevant.
List all changes
Please list all changes in the commit.
Added param
use_bert_dropout
to control this behavior, defaults to False to keep the same default behavior Modified logic inbert_model
Added a Bert test intest_run_detext.py
Testing
local test
Test Configuration:
Checklist