Git Product home page Git Product logo

Comments (4)

luuuyi avatar luuuyi commented on May 18, 2024

基本定位出问题是mask_rcnn从mmdet导出到onnx的时候,fcn_mask_head里面有一个逻辑是让特征图和阈值0.5去比较然后输出mask,在pytorch代码里面全程都是用torch.float和python原生float去做逻辑大小判断,但是通过onnx导出的时候我看了下log,他会把tensor转换为double类型的数据,然后那个0.5的阈值也不再是float32的了,直接就变成了double类型。
这个问题挺奇怪的,int类型的数据做这个逻辑判断的时候,onnx导出也会把tensor转为long类型,然后另一个待比较的值也是会变成long类型,哪怕在mmdet代码里面他们都是int32形式的。

from ppl.nn.

luuuyi avatar luuuyi commented on May 18, 2024

看了下export onnx的log,硬编码把double类型改掉了

from ppl.nn.

pranerd avatar pranerd commented on May 18, 2024

请问下这个最终怎么解决了的了?

from ppl.nn.

zhenglongjiepheonix avatar zhenglongjiepheonix commented on May 18, 2024

请问下这个最终怎么解决了的了?
建议用onnx强行改掉数据的datatype, tensor和原生类型混合导出的时候确实存在inconsistent datatype的问题,可以看一下这个issue

from ppl.nn.

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.