Open nangeblog opened 5 years ago
I have the same problem like below..!
Me too!
Try tho change: "tree.linearize()" to "tree.convert().linearize()"
Try tho change: "tree.linearize()" to "tree.convert().linearize()"
Thank you! The problem is solved for me.
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'