You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Anaconda3\envs\chinese_bert\python.exe D:/workspace/python/ChineseBert/my_test.py
Traceback (most recent call last):
File "D:/workspace/python/ChineseBert/my_test.py", line 22, in <module>
output_hidden = chinese_bert.forward(input_ids_b, pinyin_ids_b)[0]
File "D:\workspace\python\ChineseBert\models\modeling_glycebert.py", line 146, in forward
inputs_embeds=inputs_embeds
File "C:\Anaconda3\envs\chinese_bert\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\workspace\python\ChineseBert\models\fusion_embedding.py", line 64, in forward
inputs_embeds = self.word_embeddings(input_ids)
File "C:\Anaconda3\envs\chinese_bert\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Anaconda3\envs\chinese_bert\lib\site-packages\torch\nn\modules\sparse.py", line 126, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "C:\Anaconda3\envs\chinese_bert\lib\site-packages\torch\nn\functional.py", line 1852, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected tensor for argument #1 'indices' to have scalar type Long; but got torch.FloatTensor instead (while checking arguments for embedding)
进程已结束,退出代码1
The text was updated successfully, but these errors were encountered:
tokenizer无法加载多条数据
The text was updated successfully, but these errors were encountered: