Sunday, April 12, 2015

[Trouble shooting] HTK ERROR [+7031] PutTransMat: Row N of transition mat sub = 1.xxx

Problem
HERest -C src/ConfigHVite -I lists/train.phonemlf -t 250.0 150.0 1000.0 -S train.mfcc.list -H hmm0/macros -H hmm0/hmmdefs -M hmm1 lists/monophones1
Saving hmm's to dir hmm1
ERROR [+7031] PutTransMat: Row 4 of transition mat sum = 1.064684
FATAL ERROR - Terminating program HERest


Solution
Too much data. Use the -p option, splitting the input and processing over several machines, then doing a separate HERest pass with -p 0 to accumulate the accumulators. Or, as above, use a smaller portion of the data. Also, make sure that the file durations are spread evenly across lists. Don't put all the long files together, mix them up with short ones.


Reference
From HTK books:
-p N This switch is used to set parallel mode operation. If p is set to a positive integer N, then
HERest will process the training files and then dump all the accumulators into a file called
HERN.acc. If p is set to 0, then it treats all file names input on the command line as the
names of .acc dump files. It reads them all in, adds together all the partial accumulations
and then re-estimates all the HMM parameters in the normal way.

======================================================
This problem could appear when the sum of the specific row of transition matrix is not 1.

It could be possible when the # of training data is too much.

--> Split the training script file and run HERest as parallel mode using 'p' option.

e.g.,

HERest -S trnlist1 -I lab1 -H dir1/hmmdefs1 -M dir2 -p 1 hmmlist    # part1
HERest -S trnlist2 -I lab2 -H dir1/hmmdefs2 -M dir2 -p 2 hmmlist    # part2
HERest                      -H dir1/hmmdefs  -M dir2 -p 0 hmmlist  dir2/*.acc # Merging

1 comment: