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

Some modifications to the SRE16 v2 recipe #1986

Merged

Conversation

phanisankar-nidadavolu
Copy link
Contributor

  1. Removed utils/data/get_utt2num_frames.sh and added --write-num-frames option to local/nnet3/prepare_feats_for_egs.sh
  2. Made corresponding changes in run.sh

IMPORTANT

Results I got
Using Adapted PLDA, EER: Pooled 9.071%, Tagalog 12.98%, Cantonese 5.234%

Results mentioned in the original run.sh:

EER: Pooled 8.57%, Tagalog 12.29%, Cantonese 4.89%

They are not the same. Are the results in run.sh updated or is it something that I did wrong (in the modified recipe)?

@@ -127,7 +127,7 @@ fi
dropout_schedule='0,0@0.20,0.1@0.50,0'
srand=123
if [ $stage -le 6 ]; then
steps/nnet3/train_raw_dnn.py --stage=$train_stage \
python steps/nnet3/train_raw_dnn.py --stage=$train_stage \
--cmd="$train_cmd" \
--trainer.optimization.proportional-shrink 10 \
--trainer.optimization.momentum=0.5 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change correct? I think the shebang at the top of the python file should take care of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works but not necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should revert this change. It seems customary to rely on what's in the shebang.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -178,10 +181,9 @@ if [ $stage -le 3 ]; then
# wasteful, as it roughly doubles the amount of training data on disk. After
# creating training examples, this can be removed.
local/nnet3/xvector/prepare_feats_for_egs.sh --nj 40 --cmd "$train_cmd" \
--write_utt2num_frames true \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually the options look like this: --write-utt2num-frames

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. Let me change it.

@@ -53,18 +65,31 @@ for n in $(seq $nj); do
utils/create_data_link.pl $featdir/xvector_feats_${name}.$n.ark
done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the call to create_data_link.pl is invoked at line 55 and again at 65. I think you should delete the first one.

Also, I don't think you need to do the create_split_dir.pl here. I think that should be the responsibility of the caller.

Copy link
Contributor

@david-ryan-snyder david-ryan-snyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There were just a few typos though. See inline comments.


for n in $(seq $nj); do
# the next command does nothing unless $featdir/storage/ exists, see
# the next command does nothing unless $mfccdir/storage/ exists, see
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should say featdir, not mfccdir

@@ -113,7 +113,7 @@ if [ $stage -le 5 ]; then
output-layer name=output include-log-softmax=true dim=${num_targets}
EOF

steps/nnet3/xconfig_to_configs.py \
python steps/nnet3/xconfig_to_configs.py \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this back to the way it was... there are reasons to rely on what's in the shebang line of the python file.

@@ -28,7 +28,7 @@ sre16_trials_tgl=data/sre16_eval_test/trials_tgl
sre16_trials_yue=data/sre16_eval_test/trials_yue
nnet_dir=exp/xvector_nnet_1a

stage=0
stage=10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be stage=0

@david-ryan-snyder
Copy link
Contributor

Thanks Phani! This looks good to me. @danpovey, I think we can merge it.

Copy link
Contributor

@danpovey danpovey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple additional comments

@@ -13,6 +13,7 @@ norm_vars=false
center=true
compress=true
cmn_window=300
write_utt2num_frames=false # if true writes utt2num_frames
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any circumstance under which you don't need this option? It seems to me it would be better to not have an option at all, and just write this in any case.

@@ -41,30 +42,48 @@ done
# Set various variables.
mkdir -p $dir/log
mkdir -p $data_out
featdir=${PWD}/$dir
featdir=`readlink -f $dir`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command is not portable to BSD. Use utils/make_absolute.sh instead of readlink of.
Also we prefer $() to backticks.

@@ -41,30 +41,42 @@ done
# Set various variables.
mkdir -p $dir/log
mkdir -p $data_out
featdir=${PWD}/$dir
featdir=`utils/make_absolute.sh $dir`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget what Dan said:

Also we prefer $() to backticks.

@david-ryan-snyder
Copy link
Contributor

Thanks. @danpovey, I'm pretty sure it's ready now.

@danpovey danpovey merged commit 3ea5340 into kaldi-asr:master Nov 2, 2017
kronos-cm added a commit to kronos-cm/kaldi that referenced this pull request Nov 4, 2017
* 'master' of https://github.com/kaldi-asr/kaldi:
  [src,scripts] nnet1-related changes: (kaldi-asr#1998)
  [egs] rotation for image augmentation in CIFAR example (kaldi-asr#1955)
  [egs] Minor fixes to the SRE16 v2 recipe (kaldi-asr#1986)
  [egs] Remove deprecated non-working scripts
  [scripts] Fixes to segment_long_utterances.sh (thanks @christophfeinauer) and train_raw_dnn.py (kaldi-asr#1993)
  [src] Minor fix: change to error message (kaldi-asr#1980)
  [egs] Add example of component-level l2-regularize for WSJ scripts
  [egs] Small fix to Chime4 RE data location (kaldi-asr#1966)
  [build] Remove download of ATLAS header files from tools/. (kaldi-asr#1974)
xiaohui-zhang pushed a commit to xiaohui-zhang/kaldi that referenced this pull request Nov 14, 2017
mahsa7823 pushed a commit to mahsa7823/kaldi that referenced this pull request Feb 28, 2018
Skaiste pushed a commit to Skaiste/idlak that referenced this pull request Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants