kaldi-asr / kaldi

kaldi-asr/kaldi is the official location of the Kaldi project.
http://kaldi-asr.org
Other
14.24k stars 5.32k forks source link

online2-wav-nnet3-latgen-faster "Dimension mismatch: source features have dimension 280 and LDA #cols is 302" #2657

Closed saber5433 closed 5 years ago

saber5433 commented 6 years ago

How could I fix it?I am trying to decode the chain model of aishell2. ERROR (online2-wav-nnet3-latgen-faster[5.4]:OnlineTransform():online-feature.cc:421) Dimension mismatch: source features have dimension 280 and LDA #cols is 302

c640c916998d42bebb8571d566dd9df

my mfcc.conf 822f55893e234dce795eeed445eec6d

my online.conf b8b0144ab07350dbbaeb459321b1256

danpovey commented 6 years ago

Hm. I think I know what the problem might be, but it's not easy to fix. The way that online decoding code was designed, you are not supposed to include the pitch features in the features that you give to the i-vector extractor; it doesn't support including the pitch features there. But it looks like the pitch features must have been given to the i-vector extractor when it was trained. Fixing this would require changes to the aishell2 training script. (might involve utils/data/limit_feature_dim.sh).
@naxingyu, is there any chance you could look at this?

wbgxx333 commented 6 years ago

@saber5433 you need change the aishell2 recipe,because the ivector must use no pitch;and nnet3 can use the pitch.you can follow the danpovey,and use the utils/data/limit_feature_dim.sh.and this is the same in aishell/s5/local/nnet3/run_tdnn.sh.

naxingyu commented 6 years ago

@danpovey Sorry I just noticed this issue. I'll see what to do with the scripts.

naxingyu commented 6 years ago

@danpovey While modifying the script of aishell2, I was wondering, is there a better way of prevent this kind of issue from happening? For example, in steps/online/nnet3/prepare_online_decoding.sh, if add-pitch is enabled, compare the dimensions of the input of the ivector extractor and that of the network (minus the ivector part). If equal, there should be a warning (or error) that the user might be using pitch in the ivector of the online decoding setup.

danpovey commented 6 years ago

You're right, that's a good idea.

On Fri, Sep 7, 2018 at 2:36 AM Xingyu Na notifications@github.com wrote:

@danpovey https://github.com/danpovey While modifying the script of aishell2, I was wondering, is there a better way of prevent this kind of issue from happening? For example, in steps/online/nnet3/prepare_online_decoding.sh, if add-pitch is enabled, compare the dimensions of the input of the ivector extractor and that of the network (minus the ivector part). If equal, there should be a warning (or error) that the user might be using pitch in the ivector of the online decoding setup.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/2657#issuecomment-419338161, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJVu-uqhqbkPB6fjNeMBxttIMOKtafjks5uYhPmgaJpZM4WTCTs .

danpovey commented 6 years ago

please do it.

On Fri, Sep 7, 2018 at 2:24 PM Daniel Povey dpovey@gmail.com wrote:

You're right, that's a good idea.

On Fri, Sep 7, 2018 at 2:36 AM Xingyu Na notifications@github.com wrote:

@danpovey https://github.com/danpovey While modifying the script of aishell2, I was wondering, is there a better way of prevent this kind of issue from happening? For example, in steps/online/nnet3/prepare_online_decoding.sh, if add-pitch is enabled, compare the dimensions of the input of the ivector extractor and that of the network (minus the ivector part). If equal, there should be a warning (or error) that the user might be using pitch in the ivector of the online decoding setup.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/2657#issuecomment-419338161, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJVu-uqhqbkPB6fjNeMBxttIMOKtafjks5uYhPmgaJpZM4WTCTs .

naxingyu commented 6 years ago

OK, I'll do it after fixing this one.

On Sat, Sep 8, 2018 at 2:23 AM Daniel Povey notifications@github.com wrote:

please do it.

On Fri, Sep 7, 2018 at 2:24 PM Daniel Povey dpovey@gmail.com wrote:

You're right, that's a good idea.

On Fri, Sep 7, 2018 at 2:36 AM Xingyu Na notifications@github.com wrote:

@danpovey https://github.com/danpovey While modifying the script of aishell2, I was wondering, is there a better way of prevent this kind of issue from happening? For example, in steps/online/nnet3/prepare_online_decoding.sh, if add-pitch is enabled, compare the dimensions of the input of the ivector extractor and that of the network (minus the ivector part). If equal, there should be a warning (or error) that the user might be using pitch in the ivector of the online decoding setup.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/kaldi-asr/kaldi/issues/2657#issuecomment-419338161 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ADJVu-uqhqbkPB6fjNeMBxttIMOKtafjks5uYhPmgaJpZM4WTCTs

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/2657#issuecomment-419525472, or mute the thread https://github.com/notifications/unsubscribe-auth/ADKpxBnXnzOG2_xFt36256kSvYA1eKZ5ks5uYrm-gaJpZM4WTCTs .

naxingyu commented 5 years ago

This issue is addressed.

icestoneking commented 5 years ago

@saber5433 you need change the aishell2 recipe,because the ivector must use no pitch;and nnet3 can use the pitch.you can follow the danpovey,and use the utils/data/limit_feature_dim.sh.and this is the same in aishell/s5/local/nnet3/run_tdnn.sh.

In case of this problem, must be added “utils/data/limit_feature_dim.sh 0:39 data/${datadir}_hires data/${datadir}_hires_nopitch || exit 1;”in local/chain/run_tdnn.sh?

naxingyu commented 5 years ago

This issue had been fixed in the referred PR. You should checkout the latest code.

icestoneking commented 5 years ago

This issue had been fixed in the referred PR. You should checkout the latest code.

Ok, thank you for your reply.