@@ -159,7 +155,7 @@ class DeepSpeech2Model(nn.Layer):
...
@@ -159,7 +155,7 @@ class DeepSpeech2Model(nn.Layer):
:type share_weights: bool
:type share_weights: bool
:return: A tuple of an output unnormalized log probability layer (
:return: A tuple of an output unnormalized log probability layer (
before softmax) and a ctc cost layer.
before softmax) and a ctc cost layer.
:rtype: tuple of LayerOutput
:rtype: tuple of LayerOutput
"""
"""
@classmethod
@classmethod
...
@@ -167,8 +163,10 @@ class DeepSpeech2Model(nn.Layer):
...
@@ -167,8 +163,10 @@ class DeepSpeech2Model(nn.Layer):
default=CfgNode(
default=CfgNode(
dict(
dict(
num_conv_layers=2,#Number of stacking convolution layers.
num_conv_layers=2,#Number of stacking convolution layers.
num_rnn_layers=3,#Number of stacking RNN layers.
num_rnn_layers=4,#Number of stacking RNN layers.
rnn_layer_size=1024,#RNN layer size (number of RNN cells).
rnn_layer_size=1024,#RNN layer size (number of RNN cells).
num_fc_layers=2,
fc_layers_size_list=[512,256],
use_gru=True,#Use gru if set True. Use simple rnn if set False.
use_gru=True,#Use gru if set True. Use simple rnn if set False.
share_rnn_weights=True#Whether to share input-hidden weights between forward and backward directional RNNs.Notice that for GRU, weight sharing is not supported.
share_rnn_weights=True#Whether to share input-hidden weights between forward and backward directional RNNs.Notice that for GRU, weight sharing is not supported.
))
))
...
@@ -182,23 +180,22 @@ class DeepSpeech2Model(nn.Layer):
...
@@ -182,23 +180,22 @@ class DeepSpeech2Model(nn.Layer):