Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

paddle infer 调用报错

Open xinrenax opened this issue 9 years ago • 10 comments

I0912 16:43:00.254079 31956 Util.cpp:166] commandline:  --use_gpu=False --trainer_count=10
F0912 16:50:59.816350 32132 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295 vs. 4294967295)
*** Check failure stack trace: ***
    @     0x7f320cdf5e6d  google::LogMessage::Fail()
    @     0x7f320cdf991c  google::LogMessage::SendToLog()
    @     0x7f320cdf5993  google::LogMessage::Flush()
    @     0x7f320cdfae2e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f320cd570fe  paddle::SparseRowCpuMatrix::getRow()
F0912 16:50:59.824956 32139 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295 vs. 4294967295)
*** Check failure stack trace: ***
    @     0x7f320cd5a9b1  paddle::CpuMatrix::mul<>()
    @     0x7f320cdf5e6d  google::LogMessage::Fail()
    @     0x7f320cd543f3  paddle::CpuMatrix::mul()
    @     0x7f320cdf991c  google::LogMessage::SendToLog()
    @     0x7f320cdf5993  google::LogMessage::Flush()
    @     0x7f320cb17193  paddle::FullyConnectedLayer::forward()
    @     0x7f320cdfae2e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f320cc5c690  paddle::NeuralNetwork::forward()
    @     0x7f320cc3bb6c  paddle::TrainerThread::forward()
    @     0x7f320cc3dd38  paddle::TrainerThread::computeThread()
    @     0x7f320cd570fe  paddle::SparseRowCpuMatrix::getRow()
    @     0x7f321793a8a0  execute_native_thread_routine
    @     0x7f320cd5a9b1  paddle::CpuMatrix::mul<>()
    @     0x7f320cd543f3  paddle::CpuMatrix::mul()
    @     0x7f320cb17193  paddle::FullyConnectedLayer::forward()
    @     0x7f320cc5c690  paddle::NeuralNetwork::forward()
F0912 16:50:59.824956 32139 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295 vs. 4294967295) F0912 16:50:59.845768 32135 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295v
s. 4294967295)
*** Check failure stack trace: ***
    @     0x7f320cc3bb6c  paddle::TrainerThread::forward()
*** Check failure stack trace: ***
    @     0x7f320cc3bb6c  paddle::TrainerThread::forward()
F0912 16:50:59.824956 32139 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295 vs. 4294967295) F0912 16:50:59.845768 32135 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295v
s. 4294967295) F0912 16:50:59.847061 32134 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295 vs. 4294967295)
*** Check failure stack trace: ***
    @     0x7f320cdf5e6d  google::LogMessage::Fail()
    @     0x7f328c9d91c3  start_thread
    @     0x7f320cdf5e6d  google::LogMessage::Fail()
    @     0x7f320cc3dd38  paddle::TrainerThread::computeThread()
    @     0x7f320cdf991c  google::LogMessage::SendToLog()
    @     0x7f320cdf991c  google::LogMessage::SendToLog()
    @     0x7f321793a8a0  execute_native_thread_routine
    @     0x7f320cdf5993  google::LogMessage::Flush()
F0912 16:50:59.824956 32139 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295 vs. 4294967295) F0912 16:50:59.845768 32135 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295v
s. 4294967295) F0912 16:50:59.847061 32134 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedId_ (4294967295 vs. 4294967295) F0912 16:50:59.850940 32140 SparseRowMatrix.h:61] Check failed: globalIndices_[row] != kUnusedI
d_ (4294967295 vs. 4294967295)
*** Check failure stack trace: ***
    @     0x7f320cdf5993  google::LogMessage::Flush()
    @     0x7f328c00112d  __clone
    @     0x7f320cdfae2e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f320cdf5e6d  google::LogMessage::Fail()
    @     0x7f320cdfae2e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f328c9d91c3  start_thread
    @     0x7f320cd570fe  paddle::SparseRowCpuMatrix::getRow()
    @     0x7f320cdf991c  google::LogMessage::SendToLog()
    @     0x7f320cd5a9b1  paddle::CpuMatrix::mul<>()
    @     0x7f320cdf5993  google::LogMessage::Flush()
    @              (nil)  (unknown)
    @     0x7f328c00112d  __clone

已放弃

xinrenax avatar Sep 12 '17 09:09 xinrenax

请描述一下问题背景,使用的是什么模型,在什么环境下进行infer,python还是capi。

QiJune avatar Sep 12 '17 09:09 QiJune

用的的python,本地模式,模型的网络结果是自己写的,参考了ctr预估的模型

xinrenax avatar Sep 12 '17 09:09 xinrenax

网络训练正常,看loss的下降和auc的evaluate也是合理的

xinrenax avatar Sep 12 '17 09:09 xinrenax

能把python的infer程序贴一下吗

QiJune avatar Sep 12 '17 09:09 QiJune

怀疑是稀疏输入的稀疏率不够高,导致缓存超出了默认buf的大小,我们先确认下。还是先将infer代码贴下,方便我们跟进

kuke avatar Sep 12 '17 09:09 kuke

infer的代码如下

paddle.init(use_gpu=False, trainer_count=10) model = Model(config.FEA_DIMS) predict = model.predict

with gzip.open(model_path, 'r') as f:
    parameters = Parameters.from_tar(f)

test_data = []
for d in dataset.infer():
    test_data.append(d)

probs = paddle.infer(
            output_layer=predict,
            parameters=parameters,
            input=test_data,
            feeding=config.FEEDING_INPUT)

xinrenax avatar Sep 12 '17 09:09 xinrenax

把

paddle.init(use_gpu=False, trainer_count=10)

改为

paddle.init(use_gpu=False)

试一下

QiJune avatar Sep 12 '17 09:09 QiJune

刚刚试了一下,现在跑出结果了。谢谢~~~

xinrenax avatar Sep 12 '17 10:09 xinrenax

Reopen for this bug has not been fixed in paddle.

kuke avatar Sep 15 '17 07:09 kuke

Upgrade to fluid now is the best resolution.

gongweibao avatar Jul 03 '18 11:07 gongweibao