Update vision.py
This commit is contained in:
parent
6e7d5be3ff
commit
e388265a89
1 changed files with 3 additions and 2 deletions
|
|
@ -283,8 +283,9 @@ class FastBaseModel:
|
|||
tokens = ["bos_token", "eos_toke", "pad_toke", "unk_toke"]
|
||||
for token in tokens:
|
||||
if hasattr(__tokenizer, token) and not hasattr(tokenizer, token):
|
||||
exec(f"tokenizer.{token} = __tokenizer.{token}")
|
||||
exec(f"tokenizer.{token}_id = __tokenizer.{token}_id")
|
||||
_args = {"__tokenizer" : __tokenizer, "tokenizer" : tokenizer}
|
||||
exec(f"tokenizer.{token} = __tokenizer.{token}", _args)
|
||||
exec(f"tokenizer.{token}_id = __tokenizer.{token}_id", _args)
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue