Git Product home page Git Product logo

Comments (6)

AllentDan avatar AllentDan commented on May 13, 2024

文档里写了可能的原因:

模型保存错了,无法正确加载
路径不对,没正确指向(可能非常大)
c++中定义的模型和python中定义的不一致,最好打印下来,复制到文件中对比文档。

from libtorchtutorials.

for-just-we avatar for-just-we commented on May 13, 2024

文档里写了可能的原因:

模型保存错了,无法正确加载 路径不对,没正确指向(可能非常大) c++中定义的模型和python中定义的不一致,最好打印下来,复制到文件中对比文档。

但是 torch::load 报错不是运行错误,是编译错误。然后c++其实是可以加载模型的,只是我想用 torch::load 进行白盒加载,因为 torch::jit::load 是黑盒模式的加载。如果只是模型路径问题或者保存问题的话编译应该是没问题的吧

from libtorchtutorials.

AllentDan avatar AllentDan commented on May 13, 2024

第三条,要求模型完全一致,即使名字一致也要注意各层参数是否一样

from libtorchtutorials.

for-just-we avatar for-just-we commented on May 13, 2024

要求模型完全一致

这个都是一样的

from libtorchtutorials.

AllentDan avatar AllentDan commented on May 13, 2024

那就不知道了,建议先试个最简单的模型,一个bn层这种,再二分查找问题点,

from libtorchtutorials.

erzhu222 avatar erzhu222 commented on May 13, 2024

要求模型完全一致

这个都是一样的

请问问题解决了吗

from libtorchtutorials.

Related Issues (19)

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.