diff --git a/deepspeech/modules/conv.py b/deepspeech/modules/conv.py index c17d59a1b52aa4d181e322b585ba79a50d85347b..8bf48b2c80de27f6270f5858d03a90098ddb18f1 100644 --- a/deepspeech/modules/conv.py +++ b/deepspeech/modules/conv.py @@ -115,7 +115,7 @@ class ConvBn(nn.Layer): masks = masks.unsqueeze(1).unsqueeze(1) # [B, 1, 1, T] # TODO(Hui Zhang): not support bool multiply # masks = masks.type_as(x) - masks = masks.astype(x) + masks = masks.astype(x.dtype) x = x.multiply(masks) return x, x_len diff --git a/deepspeech/modules/rnn.py b/deepspeech/modules/rnn.py index 29bd28839f711088ddb7a67ea1696aa62b64fa3f..01b55c4a2f55e4bb3f61ab22fbd00be0f290fcd3 100644 --- a/deepspeech/modules/rnn.py +++ b/deepspeech/modules/rnn.py @@ -309,6 +309,6 @@ class RNNStack(nn.Layer): masks = make_non_pad_mask(x_len) #[B, T] masks = masks.unsqueeze(-1) # [B, T, 1] # TODO(Hui Zhang): not support bool multiply - masks = masks.type_as(x) + masks = masks.astype(x.dtype) x = x.multiply(masks) return x, x_len diff --git a/examples/aishell/s0/run.sh b/examples/aishell/s0/run.sh index d4961adb2a36df578388d1575fa1f6f205fed55d..4073c81b9eba69a8ee7af21d5d4595c9819357df 100755 --- a/examples/aishell/s0/run.sh +++ b/examples/aishell/s0/run.sh @@ -26,7 +26,7 @@ fi if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then # avg n best model - ./local/avg.sh exp/${ckpt}/checkpoints ${avg_num} + avg.sh exp/${ckpt}/checkpoints ${avg_num} fi if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then diff --git a/examples/aishell/s1/run.sh b/examples/aishell/s1/run.sh index 016502298df6131c458edfdb82bf8993ee3044a8..4cf09553bfece6b425799a4e44ccc78cdbc3fc6a 100644 --- a/examples/aishell/s1/run.sh +++ b/examples/aishell/s1/run.sh @@ -25,7 +25,7 @@ fi if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then # avg n best model - ./local/avg.sh exp/${ckpt}/checkpoints ${avg_num} + avg.sh exp/${ckpt}/checkpoints ${avg_num} fi if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then diff --git a/examples/librispeech/s0/run.sh b/examples/librispeech/s0/run.sh index 3e536bd79ac8e21c3a28e0f206c57996cd0a6dc9..6553e073ded9ba4105fd9b69cac520a9e87fa963 100755 --- a/examples/librispeech/s0/run.sh +++ b/examples/librispeech/s0/run.sh @@ -24,7 +24,7 @@ fi if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then # avg n best model - ./local/avg.sh exp/${ckpt}/checkpoints ${avg_num} + avg.sh exp/${ckpt}/checkpoints ${avg_num} fi if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then diff --git a/examples/librispeech/s1/run.sh b/examples/librispeech/s1/run.sh index 472e6ebfbd4d939bddb41771b5938c2b7595d6ff..65194d902e7b2a8553f996020e9485ca58d7402a 100755 --- a/examples/librispeech/s1/run.sh +++ b/examples/librispeech/s1/run.sh @@ -24,7 +24,7 @@ fi if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then # avg n best model - ./local/avg.sh exp/${ckpt}/checkpoints ${avg_num} + avg.sh exp/${ckpt}/checkpoints ${avg_num} fi if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then