ERNIE_GEN 使用fp16混合精度训练报错 InvalidArgumentError: Tensor holds the wrong type, it holds float, but desires to be ::paddle::platform::float16.
Created by: weili-ict
CUDA:10.1,cudnn:7.6,V100 32g 使用paddlepaddle1.7.2和paddlepaddle1.8.3都报如下错误,请问什么原因?
2429 Python Call Stacks (More useful to users): 2430 ------------------------------------------ 2431 File "paddle1.7_py3.6/lib/python3.6/site-packages/paddle/fluid/framework.py", line 2525, in append_op 2432 attrs=kwargs.get("attrs", None)) 2433 File "paddle1.7_py3.6/lib/python3.6/site-packages/paddle/fluid/layers/math_op_patch.py", line 243, in _ impl_ 2434 attrs={'axis': axis}) 2435 File "model/optimization.py", line 1 38, in optimization 2436 param.name] * weight_decay * scheduled_lr 2437 File "run_seq2seq.py", line 152, in main 2438 epsilon=args.epsilon) 2439 File "run_seq2seq.py", line 355, in 2440 main(args) 2441 2442 ---------------------- 2443 Error Message Summary: 2444 ---------------------- 2445 InvalidArgumentError: Tensor holds the wrong type, it holds float, but desires to be ::paddle::platform::float16. 2446 [Hint: Expected valid == true, but received valid:0 != true:1.] at (/paddle/paddle/fluid/framework/tensor_impl.h:33) 2447 [operator < elementwise_mul > error]