-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
采用自己的网络模型,计算出的结果与matlab运算出的相差较大 #50
Comments
matlab 是 col-major 存储的,如果模型是 matlab 训练的,里头的 weight 要变换下。。 |
@nihui 答复神速啊,非常感谢! 我的模型不是用matlab训练的,就是caffe.exe跑得训练。后来发现是数据预处理不一致导致的。 |
const float mean_vals[3] = { 127.5f, 127.5f, 127.5f }; |
@nihui 原来如此!!!谢大神! |
@nihui ,如果mean_vals[3] = {104.f, 112.f, 121.f}呢,对应的norm_vals[3] 是怎么算的 |
具体的 mean norm 要参考训练的设置 |
您好,这里不是很理解,为啥均值和方差和pytorch 训练模型时使用的不一致??? |
如题,您可不可以帮忙指点问题可能出在哪儿?
确认过ncnn每层网络输入输出size,简单看了几个FC的weight值,是正确的。
会不会下面的代码有问题?
int detect_faceIDnet(const cv::Mat& bgr, float *feat)
{
ncnn::Mat in = ncnn::Mat::from_pixels(bgr.data, ncnn::Mat::PIXEL_BGR, bgr.cols, bgr.rows);
in.substract_mean_normalize(mean_vals, 0);
}
The text was updated successfully, but these errors were encountered: