栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

get tensor value: model/inference/Max

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

get tensor value: model/inference/Max

Describe the bug

I have noticed that xxx must be const is a known issue, but I also found a PR which says onNX has supported dynamic padding, but I still got the following error:

OP=Pad
Name=some/path/to/op/Pad
Inputs:
        some/path/to/op/concat:0=Concat, [-1, -1], 1
        some/path/to/op/Pad/paddings_Concat__113:0=Concat, [2, 2], 6
Outpus:
        some/path/to/op/Pad:0=[-1, -1], 1
Traceback (most recent call last):
  File "D:PythonPython36libsite-packagestf2onnxtfonnx.py", line 352, in tensorflow_onnx_mapping
    func(g, node, **kwargs)
  File "D:PythonPython36libsite-packagestf2onnxonnx_opsetnn.py", line 401, in version_1
    paddings = np.array(node.inputs[1].get_tensor_value()).transpose().flatten()
  File "D:PythonPython36libsite-packagestf2onnxgraph.py", line 256, in get_tensor_value
    raise ValueError("get tensor value: {} must be Const".format(self.name))
ValueError: get tensor value: some/path/to/op/Pad/paddings_Concat__113 must be Const
2019-11-21 15:52:39,788 - VERBOSE - tf2onnx.tfonnx: Mapping TF node to onNX node(s)
2019-11-21 15:52:40,098 - ERROR - tf2onnx.tfonnx: Failed to convert node some/path/to/op/Fill

Does tf2onnx plan to support dynamic padding?

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Win10
Tensorflow Version: 1.13.1
Python version: 3.6.6
ONNX: 1.6.0
ONNXRUNTIME: 1.1.10
tf2onnx: 1.5.3

try --opset 11 in the command line.
We have not pushed this to pypi yet so you’d need to user master.

参考:
https://github.com/onnx/tensorflow-onnx/issues/655
https://github.com/onnx/tensorflow-onnx/issues/746

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/468377.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号