Comments (2)
for (int i = 0; i < 256; ++i) {
cv::Vec3f* ptr = rect_img.ptr<cv::Vec3f>(i);
for (int j=0;j<256;j++){
input_tensor_->host<float>()[i*j] = ptr[j][0];
input_tensor_->host<float>()[i*j+1] = ptr[j][1];
input_tensor_->host<float>()[i*j+2] = ptr[j][2];
}
}
这段代码明显有问题,如果是 nhwc 布局应该是 (i * 256 + j)*3 .
from mnn.
另外 onnx 一般是 NCHW 布局,转换 mnn 时加上 --keepInputFormat=1 ,
input_tensor_->host<float>()[i*256+j] = ptr[j][0];
input_tensor_->host<float>()[i*256+j+1*256*256] = ptr[j][1];
input_tensor_->host<float>()[i*256+j+2*256*256] = ptr[j][2];
from mnn.
Related Issues (20)
- 使用 llm_demo 运行Qwen-1_8B-Chat模型的llm.mn, 没有交互
- 英伟达T4上运行OpencCL报错 HOT 3
- 文档网页无法访问
- 如何将MNN的numpy对象转换为numpy对象?
- Android跑两个模型,OpenCL只能在一个上面生效。 HOT 5
- 目前MNN支持解析qat模型吗? HOT 1
- doc多处链接失效
- vulkan crashed on android 9 with Qualcomm Technologies, Inc SDM660 HOT 3
- opencl matmul运行crash HOT 8
- 自定义神经网络
- Error is between /model.23/TopK and /model.23/Unsqueeze HOT 1
- 在linux上进行编译时出现错误 HOT 1
- Performance degradation from `2.8.1` to `2.9.2`
- 缺少 Convolution2DTransposeBias 算子, TFLite 模型转MNN后运行崩溃
- efficientvit模型fp16精度不对 HOT 3
- Android上使用simpleperf输出调用栈的时候无法得到函数名
- 鸿蒙Next单框架编译Mnn时,MNN_OPENGL打开编译不过
- Qwen2-7b使用cuda运行输出结果不正常
- 请问如何将 safetensors 模型文件转化成 mnn 模型?
- cuda A6000输入超过2000时,推理错误,CPU推理正常
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mnn.