neural-template-gen icon indicating copy to clipboard operation
neural-template-gen copied to clipboard

TypeError occurred when generation.

Open lzswangjian opened this issue 5 years ago • 3 comments

I have followed the steps in mentioned in Read.md for generating text from src_uniq_valid.txt. For testing, I trained a model with a small amount of annotation data. I have rerun segmentation part and used pretrained model. I am unable to debug it. What could be the issue? Traceback (most recent call last): File "chsmm.py", line 1382, in gen_from_src() File "chsmm.py", line 1303, in gen_from_src gen_from_srctbl(src_tbl, top_temps, coeffs, src_line=src_line) File "chsmm.py", line 1244, in gen_from_srctbl str_phrases = [" ".join([str(n) if type(n) is int else n for n in phrs]) for phrs in best_phrases] TypeError: 'NoneType' object is not iterable

lzswangjian avatar Apr 15 '19 08:04 lzswangjian

It looks to me like best_phrases is never getting updated, and so it remains None. This can happen, for instance, if you only generate 0-length generations.

swiseman avatar Apr 15 '19 14:04 swiseman

It looks to me like best_phrases is never getting updated, and so it remains None. This can happen, for instance, if you only generate 0-length generations.

I have the same problem and don't know how to solve it.

gwlgmz avatar May 14 '19 09:05 gwlgmz

same issue

SeaOfOcean avatar Jan 21 '20 07:01 SeaOfOcean