diff --git a/tools/program.py b/tools/program.py index dd8037e4736099eba93ea248d82006e1c2147c7b..53994b8560f826c43cd50919237fab2b7fe1c64d 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