-
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
ncnn如何处理float浮点型数据? #373
Comments
|
老大,你这个真的是帮了大忙啊 |
大佬 我现在的输入数据是一个非图像类型的float数组(50乘50大小的),而且初始的模型是tensorflow格式的,通过->coreml->onnx->ncnn后,用您这种方法算出的数据不论输入什么数据,输出结果都是一样的。我如下方法调用的: |
是的,我也遇到了同样的问题。无论输入是什么输出都不变。我的model是从caffe转ncnn的,也是处理非图片数据。调用方法和以上类似: 希望大佬@nihui 解答!! |
输出数据不对,建议 extract 前面几层的 blob 观察,找到计算出错的是哪一层 |
我想问下,现在我模型有一个opencv表示为cv_f32c3的三通道mat输入,我按照上面的提示用ncnn这样写我的输入: |
针对onnx模型转换的各种问题,推荐使用最新的pnnx工具转换到ncnn pip install pnnx
pnnx model.onnx inputshape=[1,3,224,224] 详细参考文档 |
我们caffe的模型数据是float*型的三个单通道数据,这个输入数据在ncnn上如何进行表示呢?
举例来说,比如我的输入数据是:2562564 × 3 ,但是ncnn一次性只能输入最大256×256*4的矩阵大小.
我是不是可以用:
ex.input("input_param", in)
输入是三个这样的。
或者:
cnn::Mat in = ncnn::Mat::from_pixels((const unsigned char*)input_data, ncnn::Mat::PIXEL_RGBA, input_size.width*3, input_size.height); 把width放大三倍??
The text was updated successfully, but these errors were encountered: