python - 变换图。您必须使用 dtype float 和 shape 为占位符张量“image”提供一个值
问题描述
我正在尝试在冻结之前优化图形。
quant_graph_def = TransformGraph(input_graph_def=graph_def,
inputs=input_names_,
outputs=output_names_,
transforms=["quantize_nodes"])
因此,在使用 InteractiveSession 推断之后 - 我看到了消息:
您必须使用 dtype float 和 shape [?,?,?,6] [[{{node import/image}}]] 为占位符张量“import/image”提供一个值
但是没有 quantize_nodes - 没问题。TransformGraph 函数的 TensorFlow 版本是 1.10。并且推断 tensorflow 是 2.x。
解决方案
推荐阅读
- python - Pandas - 将单行与同一数据框中的所有行进行比较
- sql - 获取每条记录的分秒时间,然后求和
- android - 使用外部图库应用打开照片并浏览目录的照片
- r - 用多种函数拟合数据
- python - 具有最小长度的序列
- powershell - 递归函数中属性值的缩短输出
- gitlab - 我应该如何在 Linux 上安装 gitlab-runners?
- maven-central - 我应该如何在 Maven Central 中表示具有两种配置的库?
- javascript - 获取标签 url 返回始终未定义
- webpack - 使用 Foundation 6 设置 Laravel 8