我正在使用Stanford POS Tagger训练语料库。我准备了设置文件" Prop"并格式化数据并开始培训。
在那之后,我开始收到像" Lambda Too Big"这些信息一直持续到培训结束。之后我尝试了这个模型并继续给我一个" Out of Memory Exception"。我厌倦了HPC上的模型,它拥有超过40GB的RAM并且增加了java的堆空间以使用25gb,但同样的问题仍然存在。
我使用的语料库大约有6000个句子,句子中的最小单词数是3,最大单词是128个单词。一个单词可以有三个标签,例如{p1} {p2}。
当我开始训练时,这是日志:
pcond initialized
zlambda initialized
ftildeArr initialized
QNMinimizer called on double function of 337720 variables, using M = 10.
Iter. 0: neg. log cond. likelihood = 821394.2976644086 [1 calls to valueAt]
An explanation of the output:
Iter The number of iterations
evals The number of function evaluations
SCALING <D> Diagonal scaling was used; <I> Scaled Identity
LINESEARCH [## M steplength] Minpack linesearch
1-Function value was too high
2-Value ok, gradient positive, positive curvature
3-Value ok, gradient negative, positive curvature
4-Value ok, gradient negative, negative curvature
[.. B] Backtracking
VALUE The current function value
TIME Total elapsed time
|GNORM| The current norm of the gradient
{RELNORM} The ratio of the current to initial gradient norms
AVEIMPROVE The average improvement / current value
EVALSCORE The last available eval score
Iter ## evals ## <SCALING> [LINESEARCH] VALUE TIME |GNORM| {RELNORM} AVEIMPROVE
EVALSCORE
Iter 1 evals 1 <D> [lambda 5525 too big: 623.532051211901
lambda 28341 too big: 623.5660256059567
lambda 153849 too big: 623.5660256059567
此外,以下是prop文件中使用的设置:
## tagger training invoked at Thu Mar 03 01:31:10 AST 2016 with arguments:
model = arabic.New.tagger
arch = words(-2,2),order(1),prefix(6),suffix(6),unicodeshapes(1)
wordFunction =
trainFile = format=TSV,Train.txt
closedClassTags =
closedClassTagThreshold = 40
curWordMinFeatureThresh = 1
debug = false
debugPrefix =
tagSeparator = /
encoding = UTF-8
iterations = 100
lang = arabic
learnClosedClassTags = false
minFeatureThresh = 3
openClassTags =
rareWordMinFeatureThresh = 3
rareWordThresh = 5
search = qn
sgml = false
sigmaSquared = 0.0
regL1 = 0.75
tagInside =
tokenize = false
tokenizerFactory = edu.stanford.nlp.process.WhitespaceTokenizer
tokenizerOptions =
verbose = false
verboseResults = true
veryCommonWordThresh = 250
xmlInput =
outputFile =
outputFormat = slashTags
outputFormatOptions =
nthreads = 1
有谁能告诉我我做错了什么?
答案 0 :(得分:0)
关于Lambda尺寸信息,您可以在此处找到答案:Lambda Size is Too Bog
关于Out Of Memory Exception
,请详细说明要标记的文件的大小。无论如何,我怀疑你正在尝试为标记器传递一个大文件。尝试传递100 KB
文件作为测试。如果您的文件大小很小,我认为您不会收到错误消息。但是,如果Out Of Memory Exception
错误消息一直显示,那么您可以在此处java-nlp-user
发送问题:java-nlp-user。请注意,在发布任何问题之前,您必须在列表中加入。
我希望这可以帮到你!