dalinvip / cnn-lstm-bilstm-deepcnn-clstm-in-pytorch

In PyTorch Learing Neural Networks Likes CNN、BiLSTM
Apache License 2.0
1.25k stars 342 forks source link

运行到for batch in train_iter的时候报错了,RuntimeError: sizes must be non-negative #5

Closed Kryptonites closed 5 years ago

Kryptonites commented 5 years ago

我把2分类改成了多分类 examples += [data.Example.fromlist([sentence, flag], fields=fields)] flag对应line[-2]的值

dalinvip commented 5 years ago

reference https://github.com/bamtercelboo/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch/blob/master/DataLoader/mydatasets_self_five.py