提交 a4815f33 编写于 作者: S Superjom

fix infer bug

上级 d9f8926e
......@@ -50,7 +50,7 @@ class CTRInferer(object):
dnn_layer_dims,
dnn_input_dim,
lr_input_dim,
model_type=args.model_type,
model_type=ModelType(args.model_type),
is_infer=True)
# load parameter
logger.info("load model parameters from %s" % param_path)
......
......@@ -95,8 +95,9 @@ class CTRmodel(object):
# use sigmoid function to approximate ctr rate, a float value between 0 and 1.
act=paddle.activation.Sigmoid())
self.train_cost = paddle.layer.multi_binary_label_cross_entropy_cost(
input=self.output, label=self.click)
if not self.is_infer:
self.train_cost = paddle.layer.multi_binary_label_cross_entropy_cost(
input=self.output, label=self.click)
return self.output
def _build_regression_model(self, dnn, lr):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册