Giter Club home page Giter Club logo

Comments (11)

jxt1234 avatar jxt1234 commented on June 4, 2024

输出不要 resize

m_mnnNet_decoder->resizeTensor(output_vector, {2, input_ids_size, 46});

from mnn.

younghuvee avatar younghuvee commented on June 4, 2024

输出不要 resize

m_mnnNet_decoder->resizeTensor(output_vector, {2, input_ids_size, 46});

试过了,没什么变化

from mnn.

younghuvee avatar younghuvee commented on June 4, 2024

直接把onnx模型按照需要的size导出,不设置dynamic_size的话,推理结果是正确的

from mnn.

jxt1234 avatar jxt1234 commented on June 4, 2024

设置 dyamic_size 后导出 onnx ,然后按指定输入用 testMNNFromOnnx.py 测试结果如何?

from mnn.

jxt1234 avatar jxt1234 commented on June 4, 2024

int i_modelW2 = input_img->width();
int i_modelH2 = input_img->height();
int i_modelC2 = input_img->channel();
int i_modelB2 = input_img->batch();
int i2_modelW2 = input_mask->width();
int i2_modelH2 = input_mask->height();
int i2_modelC2 = input_mask->channel();
int i2_modelB2 = input_mask->batch();
int m_modelW2 = input_ids->width();
int m_modelH2 = input_ids->height();
int m_modelC2 = input_ids->channel();
int m_modelB2 = input_ids->batch();
int o_modelW2 = output_vector->width();
int o_modelH2 = output_vector->height();
int o_modelC2 = output_vector->channel();
int o_modelB2 = output_vector->batch();

这一段有点问题,非四维不要用 width/height 等,用 length(0) , length(1) , length(2)

from mnn.

jxt1234 avatar jxt1234 commented on June 4, 2024

::memcpy(input_1->writeMap(), src_mask.data(), src_mask.size() * sizeof(bool));
这个 bool 都换成 int32_t

from mnn.

younghuvee avatar younghuvee commented on June 4, 2024

设置 dyamic_size 后导出 onnx ,然后按指定输入用 testMNNFromOnnx.py 测试结果如何?

image

结果如图,这个误差应该是正确的,不太大,C++里面的误差非常大

from mnn.

younghuvee avatar younghuvee commented on June 4, 2024

是不是resizeSession产生的错误呢

from mnn.

younghuvee avatar younghuvee commented on June 4, 2024

设置 dyamic_size 后导出 onnx ,然后按指定输入用 testMNNFromOnnx.py 测试结果如何?

image

结果如图,这个误差应该是正确的,不太大,C++里面的误差非常大

但是 MNN的推理结果是和pytorch比的,这个结果是mnn和onnx比的

from mnn.

younghuvee avatar younghuvee commented on June 4, 2024

1

from mnn.

jxt1234 avatar jxt1234 commented on June 4, 2024

设置 dyamic_size 后导出 onnx ,然后按指定输入用 testMNNFromOnnx.py 测试结果如何?

image

结果如图,这个误差应该是正确的,不太大,C++里面的误差非常大

这个误差挺大的。更新到 2.9.0 测试下,仍然有问题的话发一下 onnx

from mnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.