Closed mittalsarthak closed 5 years ago
Hi,
Thank you for pointing out the bug! I find that seq_wc.py always misses the LAST sentence in the testing file. So I guess you only put one sentence in your testing file (then there will be nothing in the results)? I will try to fix it ASAP. If you would like a simple and quick fix, please just "pad" one random sentence at the end of your testing file.
Thanks, Yu
Hi Yu,
I have padded the input file with a sentence but now I am getting this error:
Traceback (most recent call last):
File "seq_wc.py", line 89, in
May I ask what PyTorch version you are using? This repo only supports PyTorch 0.3.
Hi Yu, I am using torch 1.1.0. But I have figured out the error. In predictor.py, I have made changes in decode_l function of predict class.
def decode_l(self, feature, label):
return '\n'.join(map(lambda t: t[0] + ' '+ self.r_l_map[t[1].item()], zip(feature, label)))
I am trying to use seq_wc.py to prediction using the pre-trained model provided by you but in the output file, I am not getting results. It creates 5 output files but all of them are blank. Can you help me with this?