lanwuwei / SPM_toolkit

Neural network toolkit for sentence pair modeling.
303 stars 70 forks source link

error message in main_snli.py #15

Open NiceMartin opened 5 years ago

NiceMartin commented 5 years ago

Hi, I run the main_snli.py, but got an error message in def create_batch(data,from_index, to_index):

I changed the following sentence left_sents = torch.cat((dict[word].view(1, -1) for word in lsent)) to left_sents = torch.cat([dict[word].view(1, -1) for word in lsent])

lanwuwei commented 5 years ago

Thanks! I think this was caused by PyTorch version difference. In my previous experiment, both were OK. Now it should be list instead of tuple.

NiceMartin commented 5 years ago

I see. I learned a lot from your code. Thank you very much for your excellent work