未验证 提交 71bb3188 编写于 作者: W Wilber 提交者: GitHub

modify norm kernel to run caffe_facedetection model (#2008)

* modify norm kernel to run caffe_facedetection model

* reserve bind norm, remove calc of norm output
上级 90ddbd63
......@@ -47,4 +47,5 @@ REGISTER_LITE_KERNEL(
norm, kARM, kFloat, kNCHW, paddle::lite::kernels::arm::NormCompute, def)
.BindInput("X", {LiteType::GetTensorTy(TARGET(kARM))})
.BindOutput("Out", {LiteType::GetTensorTy(TARGET(kARM))})
.BindOutput("Norm", {LiteType::GetTensorTy(TARGET(kARM))})
.Finalize();
......@@ -612,6 +612,7 @@ struct SequenceSoftmaxParam {
struct NormParam {
const lite::Tensor* X{};
lite::Tensor* Out{};
lite::Tensor* Norm{};
int axis{1};
float epsilon{1e-10};
};
......
......@@ -46,7 +46,7 @@ class NormComputeTester : public arena::TestCase {
auto* x = scope->FindTensor(input_);
const auto* x_data = x->data<float>();
int axis = axis_ < 0 ? axis + dims_.size() : axis_;
int axis = axis_ < 0 ? axis_ + dims_.size() : axis_;
int pre_n = dims_.count(0, axis);
int n = dims_[axis];
int post_n = dims_.count(axis + 1, dims_.size());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册