v2版本factorization_machine使用sparse更新出错
您好!我在使用factorization_machine时,input layer是sparse_binary_data格式,如果factorization_machine的sparse_update设置为false,可以正常更新,但如果设置为true,则会失败。代码如下,帮忙看下哈~
def fm_layer(self, input_data, factor_size, fm_param_attr=None):
first_order = paddle.layer.fc(input=input_data,
size=1,
act=paddle.activation.Linear(),
param_attr=paddle.attr.ParameterAttribute(sparse_update=True))
second_order = paddle.layer.factorization_machine(
input=input_data,
factor_size=factor_size,
act=paddle.activation.Linear(),
param_attr=paddle.attr.ParameterAttribute(**sparse_update=True**))
out = paddle.layer.addto(
input=[first_order, second_order],
act=paddle.activation.Linear(),
bias_attr=False)
return out
报错信息如下: Thread [140249778378496] Forwarding factorization_machine_0, *** Aborted at 1552551298 (unix time) try "date -d @1552551298" if you are using GNU date ***
PC: @ 0x0 (unknown)
*** SIGSEGV (@0x0) received by PID 11716 (TID 0x7f8e72385700) from PID 0; stack trace: ***
@ 0x318b20f500 (unknown)
@ 0x7f8e418b68bb paddle::BaseMatrixT<>::applyTernary<>()
@ 0x7f8e418b7288 paddle::BaseMatrixT<>::addRowScale()
@ 0x7f8e416ba284 paddle::FactorizationMachineLayer::backward()
@ 0x7f8e417d65b2 paddle::NeuralNetwork::backward()
@ 0x7f8e417f87c2 paddle::TrainerThread::backward()
@ 0x7f8e417f894d paddle::TrainerThread::computeThread()
@ 0x318eab6470 (unknown)
@ 0x318b207851 (unknown)
@ 0x318aee767d (unknown)
@ 0x0 (unknown)
Segmentation fault (core dumped)
我们目前v2的代码已经不再维护了,请迁移至fluid版本
Since you haven't replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。