Traceback (most recent call last):
File "D:/pycharm_pro/PyCharm 2023.1/plugins/python/helpers/pydev/pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\pycharm_pro\PyCharm 2023.1\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:\AAA\Bert\bert4keras-master\pretraining\data_utils.py", line 379, in
tokenizer, word_segment, sequence_length=sequence_length
File "E:\AAA\Bert\bert4keras-master\pretraining\data_utils.py", line 158, in init
super(TrainingDatasetRoBERTa, self).init(tokenizer, sequence_length)
File "E:\AAA\Bert\bert4keras-master\pretraining\data_utils.py", line 22, in init
self.token_pad_id = tokenizer._token_pad_id
AttributeError: 'Tokenizer' object has no attribute '_token_pad_id'
提问时请尽可能提供如下信息:
基本信息
核心代码
输出信息
Traceback (most recent call last): File "D:/pycharm_pro/PyCharm 2023.1/plugins/python/helpers/pydev/pydevd.py", line 1496, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "D:\pycharm_pro\PyCharm 2023.1\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "E:\AAA\Bert\bert4keras-master\pretraining\data_utils.py", line 379, in
tokenizer, word_segment, sequence_length=sequence_length
File "E:\AAA\Bert\bert4keras-master\pretraining\data_utils.py", line 158, in init
super(TrainingDatasetRoBERTa, self).init(tokenizer, sequence_length)
File "E:\AAA\Bert\bert4keras-master\pretraining\data_utils.py", line 22, in init
self.token_pad_id = tokenizer._token_pad_id
AttributeError: 'Tokenizer' object has no attribute '_token_pad_id'