提交 b8e6fefc 编写于 作者: H hong19860320

enable batch_norm op in cxx_api_bin, fix the bug of batch_norm op

test=develop
上级 400f599c
......@@ -69,7 +69,7 @@ USE_LITE_OP(fetch);
USE_LITE_OP(io_copy);
USE_LITE_OP(conv2d);
// USE_LITE_OP(batch_norm);
USE_LITE_OP(batch_norm);
USE_LITE_OP(relu);
USE_LITE_OP(depthwise_conv2d);
USE_LITE_OP(pool2d);
......
......@@ -82,7 +82,7 @@ bool BatchNormOp::AttachImpl(const cpp::OpDesc &op_desc, lite::Scope *scope) {
param_.variance =
scope->FindVar(op_desc.Input("Variance").front())->GetMutable<Tensor>();
param_.y = scope->FindVar(op_desc.Output("Y").front())->GetMutable<Tensor>();
param_.is_test = op_desc.GetAttr<bool>("is_test");
param_.is_test = op_desc.GetAttr<int>("is_test");
param_.use_global_stats = op_desc.GetAttr<bool>("use_global_stats");
if (!param_.is_test) {
param_.mean_out =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册