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

Parsing微调报错 #51

Closed
ndyysheep opened this issue Nov 17, 2023 · 3 comments
Closed

Parsing微调报错 #51

ndyysheep opened this issue Nov 17, 2023 · 3 comments

Comments

@ndyysheep
Copy link

您好,我按照您的要求将微调数据集的内容设置为:
1 印度 印度 NR NR _ 3 nn _ _
2 海军 海军 NN NN _ 3 nn _ _
3 参谋长 参谋长 NN NN _ 5 nsubjpass _ _
4 被 被 SB SB _ 5 pass _ _
5 解职 解职 VV VV _ 0 root _ _
但是依然报错:
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 3 dimensions. The detected shape was (2, 5, 2) + inhomogeneous part.
请求答疑

@fdugzc
Copy link
Member

fdugzc commented Nov 19, 2023

看起来有可能是数据的格式不太对,比方说本来如果需要\t做分隔符,如果用了空格,就没法正确解析。不过我不是很确定,之前的微调功能似乎就存在一些问题,一直没时间修。后面有时间了我再看看修一下吧

@ndyysheep
Copy link
Author

非常感谢您的回答,问题已经解决了,是模型源代码np.array( content)转换问题,将np.array( content)转化成np.array( content,object),就可以正常训练了。
还有一个疑问就是,Parsing功能能不能直接处理分好词的语句,而不是处理一个整句。因为Pasing依赖分析时,要自己将整句分词,它的分词结果不是我想要的结果。

@ndyysheep
Copy link
Author

因为我的训练目标中,词语的依赖关系可能和预训练好的依赖关系差别有点大

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

2 participants