SPM_toolkit icon indicating copy to clipboard operation
SPM_toolkit copied to clipboard

error message in main_snli.py

Open NiceMartin opened this issue 7 years ago • 2 comments

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])

NiceMartin avatar Nov 07 '18 06:11 NiceMartin

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.

lanwuwei avatar Nov 09 '18 01:11 lanwuwei

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

NiceMartin avatar Nov 09 '18 05:11 NiceMartin