msft-vivi / smp2020---weibo-sentiment-classification Goto Github PK
View Code? Open in Web Editor NEWSMP 2020年微博情感分类评测任务 第六名解决方案
SMP 2020年微博情感分类评测任务 第六名解决方案
错误信息:
an integer is required (got type NoneType)
File "/home/fsnip/SMP2020---Weibo-sentiment-classification/baseline/utils.py", line 85, in collate_batch
batch[k] = torch.tensor([getattr(f, k) for f in features], dtype=torch.long)
File "/home/fsnip/SMP2020---Weibo-sentiment-classification/baseline/train_and_eval.py", line 83, in trains
for step, batch in enumerate(train_dataloader):
File "/home/fsnip/SMP2020---Weibo-sentiment-classification/baseline/roberta_k_fold.py", line 335, in main
trains(args, train_dataset, dev_dataset, model, str(fold_num))
File "/home/fsnip/SMP2020---Weibo-sentiment-classification/baseline/roberta_k_fold.py", line 353, in <module>
main()
我运行时的配置:
python roberta_k_fold.py \
--pre_train_path roberta_large \
--model_name BertBase \
--output_dir usual_k_fold_model/roberta_large \
--data_dir k_fold/usual \
--max_seq_length 140 \
--train_batch_size 8 \
--gradient_accumulation_steps 8 \
--num_train_epochs 20 \
--learning_rate 1e-5 \
--warmup_rate 0.3 \
--weight_decay 0.02 \
--attack fgm \
--log_dir roberta_large.log \
--k_fold 5 \
--do_train
请问这个错误是什么原因造成的?
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.