提交 4dbe0678 编写于 作者: D DannyIsFunny

test=develop

上级 c70e2209
...@@ -227,8 +227,8 @@ struct PowerParam : ParamBase { ...@@ -227,8 +227,8 @@ struct PowerParam : ParamBase {
const lite::Tensor* X{}; const lite::Tensor* X{};
lite::Tensor* Out{}; lite::Tensor* Out{};
float scale{}; float scale{0};
float shift{}; float shift{0};
float power{}; float power{};
}; };
......
...@@ -37,9 +37,7 @@ bool PowerOp::AttachImpl(const cpp::OpDesc &op_desc, lite::Scope *scope) { ...@@ -37,9 +37,7 @@ bool PowerOp::AttachImpl(const cpp::OpDesc &op_desc, lite::Scope *scope) {
auto Out = op_desc.Output("Out").front(); auto Out = op_desc.Output("Out").front();
param_.X = scope->FindVar(X)->GetMutable<lite::Tensor>(); param_.X = scope->FindVar(X)->GetMutable<lite::Tensor>();
param_.Out = scope->FindVar(Out)->GetMutable<lite::Tensor>(); param_.Out = scope->FindVar(Out)->GetMutable<lite::Tensor>();
param_.scale = op_desc.GetAttr<float>("scale"); param_.power = op_desc.GetAttr<float>("factor");
param_.shift = op_desc.GetAttr<float>("shift");
param_.power = op_desc.GetAttr<float>("power");
CHECK(param_.X); CHECK(param_.X);
CHECK(param_.Out); CHECK(param_.Out);
...@@ -50,4 +48,4 @@ bool PowerOp::AttachImpl(const cpp::OpDesc &op_desc, lite::Scope *scope) { ...@@ -50,4 +48,4 @@ bool PowerOp::AttachImpl(const cpp::OpDesc &op_desc, lite::Scope *scope) {
} /* namespace lite */ } /* namespace lite */
} /* namespace paddle */ } /* namespace paddle */
REGISTER_LITE_OP(power, paddle::lite::operators::PowerOp); REGISTER_LITE_OP(pow, paddle::lite::operators::PowerOp);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册