Skip to content

Commit

Permalink
Refine pre_process error in armlinux demo (PaddlePaddle#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwm2013 authored Mar 20, 2020
1 parent c1273d0 commit a8a8ab5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ void preprocess(cv::Mat &input_image, const std::vector<float> &input_mean,
}
for (; i < image_size; i++) {
*(input_data_c0++) = (*(image_data++) - input_mean[0]) / input_std[0];
*(input_data_c0++) = (*(image_data++) - input_mean[1]) / input_std[1];
*(input_data_c0++) = (*(image_data++) - input_mean[2]) / input_std[2];
*(input_data_c1++) = (*(image_data++) - input_mean[1]) / input_std[1];
*(input_data_c2++) = (*(image_data++) - input_mean[2]) / input_std[2];
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ void preprocess(cv::Mat &input_image, const std::vector<float> &input_mean,
}
for (; i < image_size; i++) {
*(input_data_c0++) = (*(image_data++) - input_mean[0]) / input_std[0];
*(input_data_c0++) = (*(image_data++) - input_mean[1]) / input_std[1];
*(input_data_c0++) = (*(image_data++) - input_mean[2]) / input_std[2];
*(input_data_c1++) = (*(image_data++) - input_mean[1]) / input_std[1];
*(input_data_c2++) = (*(image_data++) - input_mean[2]) / input_std[2];
}
}

Expand Down

0 comments on commit a8a8ab5

Please sign in to comment.