transformers
98122794 - Replace assertions with value errors on distilbert model (#20463)

Commit
3 years ago
Replace assertions with value errors on distilbert model (#20463) * Changed assert into 7-8 exceptions * updated syntax error * updated error * updated file (Co-autho: Batese2001) * Successful test on test_modeling_distilbert.py Successful raising errors and exceptions on the revised code in test_modeling_distilbert.py . Co-credit: @batese2001 * Delete test_modeling_distilbert.ipynb * Update modeling_distilbert.py * Successful raising of exceptions with the conditions that are contrary to defined condition that asserts statements (Co-author: Batese2001) * Successful raising of exceptions with the conditions that are contrary to defined condition that asserts statements (Co-author: Batese2001) * committing the reformatted distilbert model * reformatted distilbert model * reformatted distilbert model * reformatted distilbert model * reformatted distilbert model with black * Changed comments that explain better about raising exceptions for not having the even number of multi heads * Changed comments that explain better about raising exceptions for not having the even number of multi heads * changed based on the feedback * Changed line 833 based on the suggestion made from @younesbelkada * Changed line 833 based on the suggestion made from @younesbelkada draft2 * reformatted file * Update src/transformers/models/distilbert/modeling_distilbert.py * Update src/transformers/models/distilbert/modeling_distilbert.py Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
Author
Parents
Loading