diff --git a/egs/wsj/s5/steps/nnet3/get_saturation.pl b/egs/wsj/s5/steps/nnet3/get_saturation.pl index 3d5ec5c2661..ed18fc1c399 100755 --- a/egs/wsj/s5/steps/nnet3/get_saturation.pl +++ b/egs/wsj/s5/steps/nnet3/get_saturation.pl @@ -35,7 +35,7 @@ # deriv-avg=[percentiles(0,1,2,5 10,20,50,80,90 # 95,98,99,100)=(0.0001,0.003,0.004,0.03 0.12,0.18,0.22,0.24,0.25 # 0.25,0.25,0.25,0.25), mean=0.198, stddev=0.0591] - if (m/deriv-avg=.+mean=([^,]+),/) { + if (m/deriv-avg=[^m]+mean=([^,]+),/) { $num_nonlinearities += 1; my $this_saturation = 1.0 - ($1 / 0.25); $total_saturation += $this_saturation; @@ -43,7 +43,7 @@ print STDERR "$0: could not make sense of line (no deriv-avg?): $_"; } } elsif (m/type=TanhComponent/) { - if (m/deriv-avg=.+mean=([^,]+),/) { + if (m/deriv-avg=[^m]+mean=([^,]+),/) { $num_nonlinearities += 1; my $this_saturation = 1.0 - ($1 / 1.0); $total_saturation += $this_saturation;