From 4dbe06788e9595980eaaeddc708b03e283390fb3 Mon Sep 17 00:00:00 2001 From: DannyIsFunny <912790387@qq.com> Date: Fri, 11 Sep 2020 08:14:07 +0000 Subject: [PATCH] test=develop --- lite/operators/op_params.h | 4 ++-- lite/operators/power_op.cc | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lite/operators/op_params.h b/lite/operators/op_params.h index 586d3d1183..596b060427 100644 --- a/lite/operators/op_params.h +++ b/lite/operators/op_params.h @@ -227,8 +227,8 @@ struct PowerParam : ParamBase { const lite::Tensor* X{}; lite::Tensor* Out{}; - float scale{}; - float shift{}; + float scale{0}; + float shift{0}; float power{}; }; diff --git a/lite/operators/power_op.cc b/lite/operators/power_op.cc index 83c9edfaca..e93336711b 100644 --- a/lite/operators/power_op.cc +++ b/lite/operators/power_op.cc @@ -37,9 +37,7 @@ bool PowerOp::AttachImpl(const cpp::OpDesc &op_desc, lite::Scope *scope) { auto Out = op_desc.Output("Out").front(); param_.X = scope->FindVar(X)->GetMutable(); param_.Out = scope->FindVar(Out)->GetMutable(); - param_.scale = op_desc.GetAttr("scale"); - param_.shift = op_desc.GetAttr("shift"); - param_.power = op_desc.GetAttr("power"); + param_.power = op_desc.GetAttr("factor"); CHECK(param_.X); CHECK(param_.Out); @@ -50,4 +48,4 @@ bool PowerOp::AttachImpl(const cpp::OpDesc &op_desc, lite::Scope *scope) { } /* namespace lite */ } /* namespace paddle */ -REGISTER_LITE_OP(power, paddle::lite::operators::PowerOp); +REGISTER_LITE_OP(pow, paddle::lite::operators::PowerOp); -- GitLab