06.label_semantic_roles/train.py 用GPU运行时报错
Created by: llxxxll
修改了train.py中的use_gpu=False > True,运行python train.py 打印错误信息如下:
python train.py I0416 10:17:39.718773 830 Util.cpp:161] commandline: --use_gpu=True --trainer_count=1 [WARNING 2017-04-16 10:17:40,129 networks.py:1444] outputs routine try to calculate network's inputs and outputs order. It might not work well.Please see follow log carefully. [INFO 2017-04-16 10:17:40,137 networks.py:1472] The input order is [word_data, ctx_n2_data, ctx_n1_data, ctx_0_data, ctx_p1_data, ctx_p2_data, verb_data, mark_data, target] [INFO 2017-04-16 10:17:40,137 networks.py:1478] The output order is [crf_layer_0, crf_dec_l] [INFO 2017-04-16 10:17:40,171 networks.py:1472] The input order is [word_data, ctx_n2_data, ctx_n1_data, ctx_0_data, ctx_p1_data, ctx_p2_data, verb_data, mark_data, target] [INFO 2017-04-16 10:17:40,171 networks.py:1478] The output order is [crf_layer_0] I0416 10:17:40.196336 830 GradientMachine.cpp:86] Initing parameters.. I0416 10:17:40.396483 830 GradientMachine.cpp:93] Init parameters done. F0416 10:17:42.085708 830 CRFLayer.cpp:57] Check failed: !useGpu_ GPU is not supported
* Check failure stack trace: *
@ 0x7f44c87db37d google::LogMessage::Fail() @ 0x7f44c87deec5 google::LogMessage::SendToLog() @ 0x7f44c87daea3 google::LogMessage::Flush() @ 0x7f44c87e03de google::LogMessageFatal::~LogMessageFatal() @ 0x7f44c850ff01 paddle::CRFLayer::forward() @ 0x7f44c8463664 paddle::NeuralNetwork::forward() @ 0x7f44c8450b23 paddle::GradientMachine::forwardBackward() @ 0x7f44c87b8617 GradientMachine::forwardBackward() @ 0x7f44c8417e47 _wrap_GradientMachine_forwardBackward @ 0x52714b PyEval_EvalFrameEx @ 0x555551 PyEval_EvalCodeEx @ 0x525560 PyEval_EvalFrameEx @ 0x555551 PyEval_EvalCodeEx @ 0x524338 PyEval_EvalFrameEx @ 0x555551 PyEval_EvalCodeEx @ 0x524338 PyEval_EvalFrameEx @ 0x5247ea PyEval_EvalFrameEx @ 0x567d14 (unknown) @ 0x465bf4 PyRun_FileExFlags @ 0x46612d PyRun_SimpleFileExFlags @ 0x466d92 Py_Main @ 0x7f44cdbe4f45 __libc_start_main @ 0x577c2e (unknown) @ (nil) (unknown) Aborted (core dumped)
train.py 改回use_gpu= True > False 错误信息消失,其他simple用类似方式修改为gpu下运行没有出现这个问题。