提交 122c82e9 编写于 作者: W WenmuZhou

测试模式时将输出softmax后返回

上级 6241b8f9
......@@ -20,6 +20,7 @@ import math
import paddle
from paddle import ParamAttr, nn
from paddle.nn import functional as F
def get_para_bias_attr(l2_decay, k, name):
......@@ -48,4 +49,6 @@ class CTC(nn.Layer):
def forward(self, x, labels=None):
predicts = self.fc(x)
if not self.training:
predicts = F.softmax(predicts, axis=2)
return predicts
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册