From 8e3aa3a09b60c3ca99ad20dc3ddb8150efd28f65 Mon Sep 17 00:00:00 2001 From: andyjpaddle Date: Mon, 8 Aug 2022 09:02:11 +0000 Subject: [PATCH] fix amp train for re --- tools/program.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/program.py b/tools/program.py index dd8037e4..53994b85 100755 --- a/tools/program.py +++ b/tools/program.py @@ -171,7 +171,7 @@ def to_float32(preds): else: preds[k] = paddle.to_tensor(preds[k], dtype='float32') else: - preds[k] = paddle.to_tensor(preds[k], dtype='float32') + preds = paddle.to_tensor(preds, dtype='float32') return preds -- GitLab