提交 520ff839 编写于 作者: C chenjiaoAngel

fix format. test=develop

上级 b18ec378
...@@ -62,6 +62,7 @@ void seq_pool_average_grad<float>(const float* din, ...@@ -62,6 +62,7 @@ void seq_pool_average_grad<float>(const float* din,
int64_t width) { int64_t width) {
for (int i = 0; i < static_cast<int>(lod.size()) - 1; ++i) { for (int i = 0; i < static_cast<int>(lod.size()) - 1; ++i) {
int64_t height = static_cast<int64_t>(lod[i + 1] - lod[i]); int64_t height = static_cast<int64_t>(lod[i + 1] - lod[i]);
const float* dout_grad_ptr = dout_grad + i * width;
float* din_grad_ptr = din_grad + lod[i] * width; float* din_grad_ptr = din_grad + lod[i] * width;
float alpha = 1.0 / height; float alpha = 1.0 / height;
if (height > 0) { if (height > 0) {
...@@ -84,6 +85,7 @@ void seq_pool_average_grad<float>(const float* din, ...@@ -84,6 +85,7 @@ void seq_pool_average_grad<float>(const float* din,
template <> template <>
void seq_pool_sqrt_grad<float>(const float* din, void seq_pool_sqrt_grad<float>(const float* din,
const float* dout_grad,
float* din_grad, float* din_grad,
const std::vector<uint64_t> lod, const std::vector<uint64_t> lod,
int64_t width) { int64_t width) {
...@@ -96,6 +98,7 @@ void seq_pool_sqrt_grad<float>(const float* din, ...@@ -96,6 +98,7 @@ void seq_pool_sqrt_grad<float>(const float* din,
if (width == 1) { if (width == 1) {
float sum = 0.f; float sum = 0.f;
for (int h = 0; h < height; ++h) { for (int h = 0; h < height; ++h) {
din_grad_ptr[h] = alpha * dout_grad_ptr[h];
} }
} else { } else {
for (int h = 0; h < height; h++) { for (int h = 0; h < height; h++) {
......
...@@ -64,7 +64,6 @@ add_kernel(reduce_max_compute_arm ARM extra SRCS reduce_max_compute.cc DEPS ${li ...@@ -64,7 +64,6 @@ add_kernel(reduce_max_compute_arm ARM extra SRCS reduce_max_compute.cc DEPS ${li
add_kernel(sequence_expand_compute_arm ARM extra SRCS sequence_expand_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(sequence_expand_compute_arm ARM extra SRCS sequence_expand_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(im2sequence_compute_arm ARM extra SRCS im2sequence_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(im2sequence_compute_arm ARM extra SRCS im2sequence_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(sequence_pool_compute_arm ARM extra SRCS sequence_pool_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(sequence_pool_compute_arm ARM extra SRCS sequence_pool_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(sequence_pool_grad_compute_arm ARM extra SRCS sequence_pool_grad_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(sequence_conv_compute_arm ARM extra SRCS sequence_conv_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(sequence_conv_compute_arm ARM extra SRCS sequence_conv_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(layer_norm_compute_arm ARM extra SRCS layer_norm_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(layer_norm_compute_arm ARM extra SRCS layer_norm_compute.cc DEPS ${lite_kernel_deps} math_arm)
add_kernel(gather_compute_arm ARM extra SRCS gather_compute.cc DEPS ${lite_kernel_deps} math_arm) add_kernel(gather_compute_arm ARM extra SRCS gather_compute.cc DEPS ${lite_kernel_deps} math_arm)
......
...@@ -155,6 +155,7 @@ void DeformableConvCompute<PRECISION(kFloat), PRECISION(kFloat)>::Run() { ...@@ -155,6 +155,7 @@ void DeformableConvCompute<PRECISION(kFloat), PRECISION(kFloat)>::Run() {
if (im_h >= 0 && im_h < hin && im_w >= 0 && im_w < win) { if (im_h >= 0 && im_h < hin && im_w >= 0 && im_w < win) {
float val = float val =
deformable_bilinear(in_data_ch, hin, win, im_h, im_w); deformable_bilinear(in_data_ch, hin, win, im_h, im_w);
if (param.modulated) { if (param.modulated) {
// use mask // use mask
const float* mask_ptr = const float* mask_ptr =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册