Comments (4)
@xdqf2128 我按照你的代码尝试复现,但我得机器环境下是执行成功的。
我看到你的错误是 Load Model failed.
,或许可以确认一下 模型地址是否正确?比如那个模型地址是否能被 with open(filename, 'r')
找到呢?
另外,如果仍有问题,你可以在编译 fwd_keras 的时候,将 ENABLE_LOGGING 改为 ON,然后再用新编译的带日志的包再试试,然后看是因为什么原因导致的 Load Model failed
。可以附上日志截图给我们看看。
P.S. 如果 Buid 成功了,注意在推理的时候,输入需要类型转换一下,要不然 numpy randn 生成的默认不是 float32 的数据,会无法通过输入数据校验。
from forward.
@yuanzexi 我按照您说的把LOGGING设为了ON
但是用新编译出来的包还是只有ERROR级别的日志没有更详细的。
然后模型路径没有问题,open可以正常找到
from forward.
@yuanzexi 我注意到报错是在trt_keras_parser.cpp(90),然后查看了源码,发现是判断模型是否为空,并检查class_name。这里我就想到了新版keras模型的class_name是Functional不是老版的Model,所以我直接替换成了老版本的模型,并添加了日志打印。
然后我把项目配置设为Debug,添加了log.conf等我觉得可能会影响日志打印的设置
结果可以打印详细的日志了,并且之前Load Model failed
确实是因为模型class_name的问题
替换了老版模型后,错误信息改变了
看样子是层的类型的问题,请问接下来要怎么解决?
from forward.
@yuanzexi 我注意到tf1.12的模型中BN并不带V1,所以用不带V1的模型试了下,成功完成了build,并且推理成功
感谢!
from forward.
Related Issues (20)
- 使用这个Forward框架进行推断的时候会有精度损失吗? HOT 6
- 关于fwd-torch的几个路径的问题 HOT 2
- Segmentation fault (core dumped) when transfer keras model to trt. HOT 4
- Help to support tensorflow slim "Flatten" pattern to Tensorrt. HOT 10
- 编译VC项目时出错 HOT 14
- vs2017怎么跑demo? HOT 8
- Is have docker with all dependencies? HOT 3
- Will forward framework support paddlepaddle in the future? HOT 4
- 编译出错 找不到cublas_device库 HOT 7
- keras.layer里Embedding的trt实现 HOT 8
- Keras中Flatten层的支持 HOT 2
- 对‘fwd::TrtForwardEngine::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)’未定义的引用 HOT 9
- 是否考虑重新写一个模型序列化?? HOT 3
- 与trtorch等项目的优劣对比 HOT 3
- make报错 HOT 22
- reflectPad存在两个问题 HOT 9
- 编译fwd-pytroch时提示缺少头文件 HOT 1
- 优化模型时报错 HOT 2
- [TRT] (Unnamed Layer* 0) [Convolution]: at least 4 dimensions are required for input HOT 1
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 forward.