关于predict.py进行输入流预测的问题
Created by: HugoLian
我新下了sentiment的predict.sh 与 predict.py https://github.com/PaddlePaddle/Paddle/tree/develop/demo/sentiment 在这个网络中,可以对输入流进行预测输出。
但是我把predict.py移植到其他网络(这里是quick_start的网络结构)中,却报错:
I1231 00:18:59.383359 9473 Util.cpp:155] commandline: --use_gpu=0
I1231 00:18:59.383488 9473 Util.cpp:130] Calling runInitFunctions
I1231 00:18:59.383779 9473 Util.cpp:143] Call runInitFunctions done.
[WARNING 2016-12-31 00:19:00,650 networks.py:1438] `outputs` routine try to calculate network's inputs and outputs order. It might not work well.Please see follow log carefully.
[INFO 2016-12-31 00:19:00,650 networks.py:1466] The input order is [word]
[INFO 2016-12-31 00:19:00,651 networks.py:1472] The output order is [__maxid_layer_0__, __fc_layer_0__]
I1231 00:19:00.676092 9473 GradientMachine.cpp:123] Loading parameters from output/pass-00014
F1231 00:19:00.677177 9473 FullyConnectedLayer.cpp:86] Check failed: input.value The input of 'fc' layer must be matrix
*** Check failure stack trace: ***
@ 0x7f59b0e03868 google::LogMessage::Fail()
@ 0x7f59b0e037c0 google::LogMessage::SendToLog()
@ 0x7f59b0e03255 google::LogMessage::Flush()
@ 0x7f59b0e06016 google::LogMessageFatal::~LogMessageFatal()
@ 0x7f59b050654b paddle::FullyConnectedLayer::forward()
@ 0x7f59b056feba paddle::NeuralNetwork::forward()
@ 0x7f59b0459026 _wrap_GradientMachine_forward
@ 0x4b4cb9 PyEval_EvalFrameEx
@ 0x4b6b28 PyEval_EvalCodeEx
@ 0x4b5d10 PyEval_EvalFrameEx
@ 0x4b6b28 PyEval_EvalCodeEx
@ 0x4b5d10 PyEval_EvalFrameEx
@ 0x4b5fb8 PyEval_EvalFrameEx
@ 0x4b5fb8 PyEval_EvalFrameEx
@ 0x4b6b28 PyEval_EvalCodeEx
@ 0x4b6c52 PyEval_EvalCode
@ 0x4e1c7d PyRun_FileExFlags
@ 0x4e3501 PyRun_SimpleFileExFlags
@ 0x4159dd Py_Main
@ 0x7f59b961dbd5 __libc_start_main
@ 0x414b71 (unknown)
predict2.sh: line 27: 9469 Broken pipe cat ./data2/data.test
9473 Aborted (core dumped) | python predict2.py --tconf=$config --model=$model --label=$label --dict=./data2/dict.txt --batch_size=1`
请问有没有一个通用的方式可以处理数据流的预测输出?或者是我哪里配置的不对么?