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

请问mynlp-classification 训练时文件大小有限制?训练文本较大的时候出现Illegal Capacity: -1异常 #23

Open
1780spark opened this issue Jul 3, 2020 · 1 comment

Comments

@1780spark
Copy link

【问题描述如下】:

使用的训练文本有356795行,有150MB,运行时候出现一下异常?

Read file build dictionary ...
Read 6M words

Number of words: 95303
Number of labels: 0
Number of wordHash2Id: 127070
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: java.lang.IllegalArgumentException: Illegal Capacity: -1
at java.util.ArrayList.(ArrayList.java:157)
at com.mayabot.nlp.fasttext.loss.HierarchicalSoftmaxLoss.(HierarchicalSoftmaxLoss.kt:29)
at com.mayabot.nlp.fasttext.loss.LossKt.createLoss(Loss.kt:36)
at com.mayabot.nlp.fasttext.FastText$Companion.train(FastText.kt:509)
at com.mayabot.nlp.fasttext.FastText$Companion.train(FastText.kt:481)
at com.mayabot.nlp.fasttext.FastText$Companion.trainSupervised(FastText.kt:435)
at com.mayabot.nlp.fasttext.FastText.trainSupervised(FastText.kt)

请问mynlp-classification 训练时文件大小有限制导致吗?

@jimichan
Copy link
Member

jimichan commented Jul 3, 2020

不太对劲

Number of labels: 0
标签数量为0
你gei几行数据看看你的格式对不对

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