Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mobilenet_yolo的mean和norm问题 #569

Closed
DL-85 opened this issue Sep 12, 2018 · 1 comment
Closed

mobilenet_yolo的mean和norm问题 #569

DL-85 opened this issue Sep 12, 2018 · 1 comment

Comments

@DL-85
Copy link

DL-85 commented Sep 12, 2018

我看到在examples/yolov2.cpp使用的减均值除方差方式是这样的:
const float mean_vals[3] = {0.5f, 0.5f, 0.5f};
const float norm_vals[3] = {0.007843f, 0.007843f, 0.007843f};
in.substract_mean_normalize(0, norm_vals);
in.substract_mean_normalize(mean_vals, 0);
这与
const float mean_vals[3] = {127.5f, 127.5f, 127.5f};
const float norm_vals[3] = {1.0/127.5,1.0/127.5,1.0/127.5};
in.substract_mean_normalize(mean_vals, norm_vals);
计算出来的结果并不相同,是不是应该改为
const float mean_vals[3] = {1.0f, 1.0f, 1.0f};
const float norm_vals[3] = {0.007843f, 0.007843f, 0.007843f};
in.substract_mean_normalize(0, norm_vals);
in.substract_mean_normalize(mean_vals, 0);
还是我哪里理解错了?

@nihui
Copy link
Member

nihui commented Nov 19, 2018

依照 caffe-yolo-windows repo 里的 demo 确实是先 scale 后去 mean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants