fix export bug
@@ -57,6 +57,9 @@ class AttentionHead(nn.Layer):
else:
targets = paddle.zeros(shape=[batch_size], dtype="int32")
probs = None
+ char_onehots = None
+ outputs = None
+ alpha = None
for i in range(num_steps):
char_onehots = self._char_to_onehot(
@@ -146,9 +149,6 @@ class AttentionLSTM(nn.Layer):
else:
targets = paddle.zeros(shape=[batch_size], dtype="int32")
probs = None
- char_onehots = None
- outputs = None
- alpha = None
for i in range(num_steps):
char_onehots = self._char_to_onehot(
