luoshunchong / ccf-bdci-scripted-character-emotion-recognition Goto Github PK
View Code? Open in Web Editor NEWCCF-BDCI-剧本角色情感识别
CCF-BDCI-剧本角色情感识别
在跑chinesebert 时出现这个问题是什么原因呀?
loading data ...
The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization.
The tokenizer class you load from this checkpoint is 'BertTokenizer'.
The class this function is called from is 'ChineseBertTokenizerFast'.
start training ...
--------------------------------- 1 fold ---------------------------------
0%| | 0/3652 [00:00<?, ?it/s]
Traceback (most recent call last):
File "reg_chineseBERT_fgm_fold_ensemble.py", line 450, in
model_train(args, train_df, tokenizer)
File "reg_chineseBERT_fgm_fold_ensemble.py", line 315, in model_train
outputs = model(ids, mask, token_type_ids)
File "/home/xxx/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "reg_chineseBERT_fgm_fold_ensemble.py", line 166, in forward
a = self.bert(input_ids=ids, attention_mask=mask, token_type_ids=token_type_ids)
File "/home/xxx/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/xxx/anaconda3/lib/python3.8/site-packages/chinesebert/modeling_chinesebert.py", line 249, in forward
outputs = self.bert(
File "/home/zdc/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/xxx/anaconda3/lib/python3.8/site-packages/chinesebert/modeling_chinesebert.py", line 163, in forward
embedding_output = self.embeddings(
File "/home/xxx/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/xxx/anaconda3/lib/python3.8/site-packages/chinesebert/fusion_embedding.py", line 84, in forward
pinyin_ids.reshape(input_shape[0], seq_length, -1)
AttributeError: 'NoneType' object has no attribute 'reshape'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.