multi_binary_label_cross_entropy使用报错
Created by: wangsouc
使用paddle v1版本的multi_binary_label_cross_entropy
报错,
最后一层配置如下:
lbl = data_layer("label", 1)
output2 = fc_layer(name="output2", input=sim, size=1, act=SigmoidActivation())
if not is_predict:
lbl = data_layer("label", 1)
evalor = evaluators.auc_evaluator(output2,lbl)
outputs([multi_binary_label_cross_entropy(input=output2, label=lbl)])`
lbl
使用的是 integer_value
类型。
出错信息如下:
F0627 18:03:17.144136 20786 Vector.cpp:96] Check failed: id < width (1 vs. 1)
*** Check failure stack trace: ***
@ 0x1086a7d google::LogMessage::Fail()
@ 0x108a52c google::LogMessage::SendToLog()
@ 0x10865a3 google::LogMessage::Flush()
@ 0x108ba3e google::LogMessageFatal::~LogMessageFatal()
@ 0xd71b3a paddle::VectorT<>::toOneHotSparseMatrix()
@ 0xb40513 paddle::MultiBinaryLabelCrossEntropy::forwardImp()
@ 0xb3c6ee paddle::CostLayer::forward()
@ 0xc34f96 paddle::NeuralNetwork::forward()
@ 0xc16f98 paddle::GradientMachine::forwardBackward()
@ 0xd3e34a paddle::TrainerInternal::forwardBackwardBatch()
@ 0xd3c9a1 paddle::TrainerInternal::trainOneBatch()
@ 0xd380e0 paddle::Trainer::trainOneDataBatch()
@ 0xd385e9 paddle::Trainer::trainOnePass()
@ 0xd36d0c paddle::Trainer::train()
@ 0xad3904 main
@ 0x318ae1ecdd (unknown)
@ 0xad353d (unknown)