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

map_adapt segfault #6

Closed
gitfoxi opened this issue Mar 17, 2015 · 7 comments
Closed

map_adapt segfault #6

gitfoxi opened this issue Mar 17, 2015 · 7 comments

Comments

@gitfoxi
Copy link

gitfoxi commented Mar 17, 2015

Doing the adaptation tutorial: http://cmusphinx.sourceforge.net/wiki/tutorialadapt?s[]=adaptation

Finally get near the payoff, something like:

./map_adapt \
    -meanfn model/means \
    -varfn model/variances \
    -mixwfn model/mixture_weights \
    -tmatfn model/transition_matrices \
    -accumdir . \ 
    -mapmeanfn model-adapt/means \
    -mapvarfn model-adapt/variances \
    -mapmixwfn model-adapt/mixture_weights \
    -maptmatfn model-adapt/transition_matrices

segfaults

INFO: cmd_ln.c(697): Parsing command line:
./map_adapt \
    -meanfn model/means \
    -varfn model/variances \
    -mixwfn model/mixture_weights \
    -tmatfn model/transition_matrices \
    -accumdir . \
    -mapmeanfn model-adapt/means \
    -mapvarfn model-adapt/variances \
    -mapmixwfn model-adapt/mixture_weights \
    -maptmatfn model-adapt/transition_matrices 

Current configuration:
[NAME]      [DEFLT] [VALUE]
-accumdir       .,
-bayesmean  yes yes
-example    no  no
-fixedtau   no  no
-help       no  no
-mapmeanfn      model-adapt/means
-mapmixwfn      model-adapt/mixture_weights
-maptmatfn      model-adapt/transition_matrices
-mapvarfn       model-adapt/variances
-meanfn         model/means
-mixwfn         model/mixture_weights
-mwfloor    0.00001 1.000000e-05
-tau        10.0    1.000000e+01
-tmatfn         model/transition_matrices
-tpfloor    0.0001  1.000000e-04
-varfloor   0.00001 1.000000e-05
-varfn          model/variances

INFO: s3gau_io.c(169): Read model/means [42x3x128 array]
INFO: s3gau_io.c(169): Read model/variances [42x3x128 array]
INFO: s3mixw_io.c(117): Read model/mixture_weights [5126x3x128 array]
INFO: s3tmat_io.c(118): Read model/transition_matrices [42x3x4 array]
INFO: main.c(426): Reading and accumulating observation counts from .
INFO: s3gau_io.c(386): Read ./gauden_counts with means with vars [42x3x128 vector arrays]
INFO: s3mixw_io.c(117): Read ./mixw_counts [5126x3x128 array]
INFO: s3tmat_io.c(118): Read ./tmat_counts [42x3x4 array]
INFO: main.c(77): Estimating tau hyperparameter from variances and observations
do-map-adapt.sh: line 10: 29451 Segmentation fault      (core dumped) ./map_adapt -meanfn model/means -varfn model/variances -mixwfn model/mixture_weights -tmatfn model/transition_matrices -accumdir . -mapmeanfn model-adapt/means -mapvarfn model-adapt/variances -mapmixwfn model-adapt/mixture_weights -maptmatfn model-adapt/transition_matrices

Backtrace:

(gdb) bt
#0  0x00000000004030bc in estimate_tau (wt_dcount=<optimized out>, wt_mixw=<optimized out>, 
    wt_mean=<optimized out>, veclen=<optimized out>, n_mixw=<optimized out>, 
    n_density=<optimized out>, n_stream=<optimized out>, n_cb=<optimized out>, 
    si_mixw=<optimized out>, si_var=<optimized out>, si_mean=<optimized out>) at main.c:96
#1  map_update () at main.c:478
#2  main (argc=0, argv=0x2a) at main.c:614

Code:

(gdb) l
91              si_mu = si_mean[0][j][k][m];
92              si_sigma = si_var[0][j][k][m];
93              ml_mu = dnom ? wt_mean[0][j][k][m] / dnom : si_mu;
94              }
95              else { /* Continuous. */
96              dnom = wt_dcount[i][j][k];
97              si_mu = si_mean[i][j][k][m];
98              si_sigma = si_var[i][j][k][m];
99              ml_mu = dnom ? wt_mean[i][j][k][m] / dnom : si_mu;
100             }

Guessing -fixedtau yes may avoid segfault and it does. But I get no improvement in accuracy. (Don't know if I would have otherwise.)

@nshmyrev
Copy link
Contributor

Thank you for the report. Unfortunately that would not be a trivial problem to fix, it will take a week or so.

Please use MLLR adaptation for PTM models.

@gitfoxi
Copy link
Author

gitfoxi commented Mar 18, 2015

Okay. Just wanted to let you know.

How can i tell if i'm using a PTM model? Have the one that came with Sirius.

I also tried the MLLR adaptation from the tutorial. My accuracy went down by a few percent. Do people usually get better results from the tutorial?

@nshmyrev
Copy link
Contributor

How can i tell if i'm using a PTM model? Have the one that came with Sirius.

It has a line -model ptm in feat.params. Our latest models are PTM

I also tried the MLLR adaptation from the tutorial. My accuracy went down by a few percent. Do people usually get better results from the tutorial?

Yes, you should not expect a lot from MLLR and actually from MAP too. There are many factors which affect accuracy and acoustic model is just one of them. There are things like language model which also should fit, the dictionary and so on.

For accuracy debugging it is recommended to share test set of the audios you want to recognize.

@gitfoxi
Copy link
Author

gitfoxi commented Mar 19, 2015

How can I share my test set? I just recorded the phrases that were recommended in the tutorial.

Thanks

On Mar 18, 2015, at 5:03 PM, Nickolay V. Shmyrev notifications@github.com wrote:

How can i tell if i'm using a PTM model? Have the one that came with Sirius.

It has a line -model ptm in feat.params. Our latest models are PTM

I also tried the MLLR adaptation from the tutorial. My accuracy went down by a few percent. Do people usually get better results from the tutorial?

Yes, you should not expect a lot from MLLR and actually from MAP too. There are many factors which affect accuracy and acoustic model is just one of them. There are things like language model which also should fit, the dictionary and so on.

For accuracy debugging it is recommended to share test set of the audios you want to recognize.


Reply to this email directly or view it on GitHub.

@nshmyrev
Copy link
Contributor

Share an archive on dropbox. Thanks

@nshmyrev
Copy link
Contributor

I fixed map_adapt in trunk, now it should work

@gitfoxi
Copy link
Author

gitfoxi commented Mar 22, 2015

Thanks! I'll try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants