Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError occurred when generation. #8

Open
lzswangjian opened this issue Apr 15, 2019 · 3 comments
Open

TypeError occurred when generation. #8

lzswangjian opened this issue Apr 15, 2019 · 3 comments

Comments

@lzswangjian
Copy link

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

@swiseman
Copy link
Contributor

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.

@gwlgmz
Copy link

gwlgmz commented May 14, 2019

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.

@SeaOfOcean
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants