Fix pir dy2st train (#13853)

This commit is contained in:
WangZhen
2024-09-11 18:54:37 +08:00
committed by GitHub
parent 33d5570249
commit 4832bb62ad
-2
View File
@@ -372,8 +372,6 @@ class SLAHead(nn.Layer):
)
pre_chars = paddle.zeros(shape=[batch_size], dtype="int32")
max_text_length = paddle.to_tensor(self.max_text_length)
# for export
loc_step, structure_step = None, None
for i in range(max_text_length + 1):
hidden, structure_step, loc_step = self._decode(pre_chars, fea, hidden)
pre_chars = structure_step.argmax(axis=1, dtype="int32")