Enable dropout = 0.0 as an equivalent to none in BPE (#1550)

* enable dropout = 0.0

* typo

* lint

* formatter

* enable dropout = 0.0

* formatter
This commit is contained in:
Marco
2024-06-24 19:36:11 +09:00
committed by GitHub
parent 9441f7e8f7
commit fdd26ba9a3
4 changed files with 35 additions and 4 deletions

View File

@ -69,6 +69,10 @@ class TestBPE:
model.byte_fallback = True
assert model.byte_fallback == True
def test_dropout_zero(self):
model = BPE(dropout=0.0)
assert model.dropout == 0.0
class TestWordPiece:
def test_instantiate(self, bert_files):