def __init__(self, n_layers=2, eDim=512, hDim=512, name=""):
layers = [0] * n_layers # ????????
for z in six.moves.range(n_layers):
if z == 0: # ???????? eDim
tDim = eDim
else: # ????????????????????????hDim
tDim = hDim
layers[z] = chaLink.LSTM(tDim, hDim)
# log??????????????????????
layers[z].lateral.W.name = name + "_L%d_la_W" % (z + 1)
layers[z].upward.W.name = name + "_L%d_up_W" % (z + 1)
layers[z].upward.b.name = name + "_L%d_up_b" % (z + 1)
super(NLayerLSTM, self).__init__(*layers)
# ????????????LSTM???
评论列表
文章目录