File "/data3/wangxin/src/snpe-1.67.0.3862/lib/python/qti/aisw/converters/onnx/onnx_translations.py", line 67, in fetch_constant_op
raise ValueError("Dynamic value for tensor name: {}, is not supported.".format(name))
ValueError: Dynamic value for tensor name: 769, is not supported.
2023-10-04 22:16:52,835 - 209 - ERROR - Node ConstantOfShape_626: Dynamic value for tensor name: 769, is not supported.
报错代码:
你可以尝试使用 reshape()
替换 view()
,因为 reshape()
通常在 ONNX 中有更好的支持
改完后的代码:
- def make_anchors_snpe(feats, strides, grid_cell_offset=0.5):
- """Generate anchors from features."""
- anchor_points, stride_tensor = [], []
- h_s=[[48,80],[24,40],[12,20]]
- dtype, device = feats[0].dtype, feats[0].device
- for i, stride in enumerate(strides):
- h, w = h_