bert运行xnli任务时有tensor类型问题
使用paddle develop分支,运行Bert 的xnli任务,对于fp16=false时会有tensor类型的报错,fp16=true时运行正常。
I0530 03:41:07.354573 44814 parallel_executor.cc:339] The Executor would execute the graph by ParallelGraph Execution which can get better performance,you can force it off by env FLAGS_enable_parallel_graph=0
Traceback (most recent call last):
File "run_classifier.py", line 383, in <module>
main(args)
File "run_classifier.py", line 288, in main
outputs = train_exe.run(fetch_list=fetch_list)
File "/opt/_internal/cpython-3.6.0/lib/python3.6/site-packages/paddle/fluid/parallel_executor.py", line 286, in run
return_numpy=return_numpy)
File "/opt/_internal/cpython-3.6.0/lib/python3.6/site-packages/paddle/fluid/executor.py", line 651, in run
return_numpy=return_numpy)
File "/opt/_internal/cpython-3.6.0/lib/python3.6/site-packages/paddle/fluid/executor.py", line 513, in _run_parallel
exe.run(fetch_var_names, fetch_var_name)
paddle.fluid.core.EnforceNotMet: Invoke operator adam error.
Python Callstacks:
File "/opt/_internal/cpython-3.6.0/lib/python3.6/site-packages/paddle/fluid/framework.py", line 1703, in append_op
attrs=kwargs.get("attrs", None))
File "/opt/_internal/cpython-3.6.0/lib/python3.6/site-packages/paddle/fluid/optimizer.py", line 1291, in _append_optimize_op
stop_gradient=True)
File "/opt/_internal/cpython-3.6.0/lib/python3.6/site-packages/paddle/fluid/optimizer.py", line 297, in _create_optimization_pass
param_and_grad)
File "/opt/_internal/cpython-3.6.0/lib/python3.6/site-packages/paddle/fluid/optimizer.py", line 442, in apply_gradients
optimize_ops = self._create_optimization_pass(params_grads)
File "/ssd1/xiege/model_5.29/models/PaddleNLP/language_representations_kit/LARK_test/LARK/BERT/optimization.py", line 107, in optimization
optimizer.apply_gradients(master_param_grads)
File "run_classifier.py", line 187, in main
loss_scaling=args.loss_scaling)
File "run_classifier.py", line 383, in <module>
main(args)
C++ Callstacks:
Tensor holds the wrong type, it holds ::paddle::platform::float16, but desires to be float at [/ssd1/xiege/paddle_wheel/Paddle/paddle/fluid/framework/tensor_impl.h:30]
这个问题将会在下一个版本修复
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reopen it. Thank you for your contributions.