Giter Site home page Giter Site logo

Comments (4)

yuanzexi avatar yuanzexi commented on April 29, 2024

@xdqf2128 我按照你的代码尝试复现,但我得机器环境下是执行成功的。
image

我看到你的错误是 Load Model failed.,或许可以确认一下 模型地址是否正确?比如那个模型地址是否能被 with open(filename, 'r') 找到呢?
另外,如果仍有问题,你可以在编译 fwd_keras 的时候,将 ENABLE_LOGGING 改为 ON,然后再用新编译的带日志的包再试试,然后看是因为什么原因导致的 Load Model failed。可以附上日志截图给我们看看。

P.S. 如果 Buid 成功了,注意在推理的时候,输入需要类型转换一下,要不然 numpy randn 生成的默认不是 float32 的数据,会无法通过输入数据校验。

from forward.

xdqf2128 avatar xdqf2128 commented on April 29, 2024

@yuanzexi 我按照您说的把LOGGING设为了ON
image
但是用新编译出来的包还是只有ERROR级别的日志没有更详细的。
image
然后模型路径没有问题,open可以正常找到
image

from forward.

xdqf2128 avatar xdqf2128 commented on April 29, 2024

@yuanzexi 我注意到报错是在trt_keras_parser.cpp(90),然后查看了源码,发现是判断模型是否为空,并检查class_name。这里我就想到了新版keras模型的class_name是Functional不是老版的Model,所以我直接替换成了老版本的模型,并添加了日志打印。
image
image
然后我把项目配置设为Debug,添加了log.conf等我觉得可能会影响日志打印的设置
image
结果可以打印详细的日志了,并且之前Load Model failed确实是因为模型class_name的问题
image
替换了老版模型后,错误信息改变了
image
image
看样子是层的类型的问题,请问接下来要怎么解决?

from forward.

xdqf2128 avatar xdqf2128 commented on April 29, 2024

@yuanzexi 我注意到tf1.12的模型中BN并不带V1,所以用不带V1的模型试了下,成功完成了build,并且推理成功
image
感谢!

from forward.

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.