memray/seq2seq-keyphrase-pytorch

Errors occurred during validation

Closed this issue · 3 comments

The following errors occurred while running validation. I really can't imagine what went wrong.The error log is shown as followed:
train: 'builtin_function_or_method' object is not iterable
for score_name, score_values in score_dict.items:
TypeError: 'builtin_function_or_method' object is not iterable
what is wrong with it,I really have no idea,please,thank you!!!

change score_dict.items to score_dict.items().
items itself is just a function, you need to call it by items().

Wow, it works. Thank you!!!

The model has been trained on kp20k. Which script should I use to predict it? I tried both of the predictive scripts and they all went wrong. Next, I don't know how to modify it. I can only consult you below.