提交 a8c8f485 编写于 作者: L LDOUBLEV

delete debug

上级 22b57e6e
......@@ -80,9 +80,7 @@ class CTCHead(nn.Layer):
result = (x, predicts)
else:
result = predicts
print("self.training: ", self.training)
if not self.training:
print("self.training, ", self.training)
predicts = F.softmax(predicts, axis=2)
result = predicts
......
......@@ -89,10 +89,11 @@ class CTCLabelDecode(BaseRecLabelDecode):
use_space_char)
def __call__(self, preds, label=None, *args, **kwargs):
if isinstance(preds, tuple):
if isinstance(preds, tuple) or isinstance(preds, list):
preds = preds[-1]
if isinstance(preds, paddle.Tensor):
preds = preds.numpy()
print(preds.shape)
preds_idx = preds.argmax(axis=2)
preds_prob = preds.max(axis=2)
text = self.decode(preds_idx, preds_prob, is_remove_duplicate=True)
......
===========================train_params===========================
model_name:ch_PPOCRv2_rec_PACT
python:python3.7
gpu_list:6
gpu_list:0|0,1
Global.use_gpu:True|True
Global.auto_cast:fp32
Global.epoch_num:lite_train_lite_infer=6|whole_train_whole_infer=300
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册