HPSG-Neural-Parser icon indicating copy to clipboard operation
HPSG-Neural-Parser copied to clipboard

No function pred_linearize

Open nangeblog opened this issue 6 years ago • 4 comments

Loading model from models/joint_bert_dev=95.55_devuas=96.67_devlas=94.86.pt1... Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex. packages/torch/nn/_reduction.py:49: UserWarning: size_average and reduce args will be deprecated, please use reduction='sum' instead. warnings.warn(warning.format(ret)) Parsing sentences... Traceback (most recent call last): File "src_joint/main.py", line 746, in main() File "src_joint/main.py", line 742, in main args.callback(args) File "src_joint/main.py", line 680, in run_parse save_data(syntree_pred, cun) File "src_joint/main.py", line 651, in save_data output_file.write("{}\n".format(tree.pred_linearize())) AttributeError: 'InternalParseNode' object has no attribute 'pred_linearize'

nangeblog avatar Sep 03 '19 02:09 nangeblog

I have the same problem like below..!

스크린샷 2020-01-27 오전 1 07 15

yunju63 avatar Jan 26 '20 16:01 yunju63

Me too!

magoafono avatar Feb 05 '20 09:02 magoafono

Try tho change: "tree.linearize()" to "tree.convert().linearize()"

sanjeetGupta avatar Feb 06 '20 03:02 sanjeetGupta

Try tho change: "tree.linearize()" to "tree.convert().linearize()"

Thank you! The problem is solved for me.

magoafono avatar Feb 06 '20 08:02 magoafono