mynlp icon indicating copy to clipboard operation
mynlp copied to clipboard

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

Open 1780spark opened this issue 4 years ago • 1 comments

【问题描述如下】:

使用的训练文本有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 训练时文件大小有限制导致吗?

1780spark avatar Jul 03 '20 08:07 1780spark

不太对劲

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

jimichan avatar Jul 03 '20 08:07 jimichan