美文网首页
TVM中tensorflow pb格式模型加载过程学习

TVM中tensorflow pb格式模型加载过程学习

作者: 编程小猪 | 来源:发表于2022-01-29 16:19 被阅读0次

1、通过tf将pb模型文件加载后生成GraphDef

这里需要注意,目前tvm只支持加载forzon的PB模型。

with tf.gfile.FastGFile(FLAGS.frozen_model_path, 'rb') as f:
        graph_def = tf.compat.v1.GraphDef()
        graph_def.ParseFromString(f.read())
        graph = tf.import_graph_def(graph_def, name='')

突然想起来我现在分析的不是TVM的源码,可能有公司代码泄漏风险,后面直接分析TVM代码后再继续写吧

相关文章

网友评论

      本文标题:TVM中tensorflow pb格式模型加载过程学习

      本文链接:https://www.haomeiwen.com/subject/ducfkrtx.html