Check layer index
@@ -499,6 +499,7 @@ def n_step_lstm(
else:
h_rest = None
+ if layer != 0:
x = dropout.dropout(x, ratio=dropout_ratio, train=train)
lstm_in = linear.linear(x, xws[layer], xbs[layer]) + \
linear.linear(h, hws[layer], hbs[layer])
