fluid.io.save_inference_model The target variable must have an associated operator that generates it.
cost, prediction = network.rank_model()
left_score = fluid.layers.fc(input=fc_pos_hid1, size=1, act="sigmoid", param_attr=hid_para_attr, bias_attr=hid_bias_attr)
# The cosine similarity score of source and right target.
fc_neg_hid1 = fluid.layers.concat(input=[fc_img] +fc_hid0[5:8], axis=1)
right_score = fluid.layers.fc(input=fc_neg_hid1, size=1, act="sigmoid", param_attr=hid_para_attr, bias_attr=hid_bias_attr)
cost = fluid.layers.rank_loss(label, left_score, right_score)
# but this operator is not supported currently.
# so AUC will not used.
return cost, left_score
fluid.io.save_inference_model(save_dirname, [var.name for var in modelvars[0:5]], [prediction], train_exe)
Traceback (most recent call last):
File "train_fc.py", line 216, in
Hi, Could you take a look at this issue? @Superjomn @Xreki Thanks!
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。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。