649453932 / Bert-Chinese-Text-Classification-Pytorch

使用Bert,ERNIE,进行中文文本分类
MIT License
4.03k stars 899 forks source link

将输出类别个数等于label数 #104

Open TheOnlylight opened 3 years ago

TheOnlylight commented 3 years ago

将输出类别个数等于label数

Originally posted by @daonna in https://github.com/649453932/Bert-Chinese-Text-Classification-Pytorch/issues/17#issuecomment-569576271 我这边也是类似问题,但是就是主要在于class中放了22行,并且也是0-21数label,但是报错

TheOnlylight commented 3 years ago

image 错误如图所示

yanzengyun commented 2 years ago

重启服务器或减小batch_size,自己就好了。。。