649453932 / Chinese-Text-Classification-Pytorch

中文文本分类,TextCNN,TextRNN,FastText,TextRCNN,BiLSTM_Attention,DPCNN,Transformer,基于pytorch,开箱即用。
MIT License
5.18k stars 1.22k forks source link

使用自己的数据集出现问题 #102

Open 670619720 opened 1 year ago

670619720 commented 1 year ago

Loading data... Vocab size: 4762 491it [00:00, 98460.66it/s] 40it [00:00, ?it/s] 42it [00:00, 42113.50it/s] Traceback (most recent call last): File "C:\Users\dell\Desktop\Chinese-Text-Classification-Pytorch-master\run.py", line 41, in dev_iter = build_iterator(dev_data, config) File "C:\Users\dell\Desktop\Chinese-Text-Classification-Pytorch-master\utils.py", line 117, in build_iterator iter = DatasetIterater(dataset, config.batch_size, config.device) File "C:\Users\dell\Desktop\Chinese-Text-Classification-Pytorch-master\utils.py", line 77, in init if len(batches) % self.n_batches != 0: ZeroDivisionError: integer division or modulo by zero

LMR-up commented 1 month ago

batch改小一点12?