Chinese-Text-Classification-Pytorch icon indicating copy to clipboard operation
Chinese-Text-Classification-Pytorch copied to clipboard

ZeroDivisionError: integer division or modulo by zero

Open leoxu1007 opened this issue 3 years ago • 1 comments

我换上了自己的语料库,就出现这个错误了

Loading data... 578it [00:00, 88400.95it/s] Vocab size: 794 578it [00:00, 62273.51it/s] 33it [00:00, 48599.73it/s] 33it [00:00, 45056.00it/s] Traceback (most recent call last): File "/home/Xu_Zhenyu/.pycharm_helpers/pydev/pydevd.py", line 1483, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/home/Xu_Zhenyu/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "//tmp/Chinese-Text-Classification-Pytorch/run.py", line 41, in dev_iter = build_iterator(dev_data, config) File "/tmp/Chinese-Text-Classification-Pytorch/utils.py", line 117, in build_iterator iter = DatasetIterater(dataset, config.batch_size, config.device) File "/tmp/Chinese-Text-Classification-Pytorch/utils.py", line 77, in init if len(batches) % self.n_batches != 0: ZeroDivisionError: integer division or modulo by zero python-BaseException

leoxu1007 avatar Sep 07 '21 08:09 leoxu1007

你好,我也遇到了这个问题,请问你解决了吗

9IrisSun avatar Jul 05 '22 17:07 9IrisSun