我正在尝试将给定的存储库https://github.com/clovaai/deep-text-recognition-benchmark中的pytorch模型转换为onnx。
在这样做的同时,我也面临着这个问题。
Failed to export an ONNX attribute 'onnx::Gather', since it's not constant, please try to make things (e.g., kernel size) static if possible链接到git issue https://github.com/clovaai/deep-text-recognition-benchmark/issues/76
有什么建议吗?
谢谢。
发布于 2020-06-03 16:48:54
在我的例子中不支持adaptive_avg_pool2d,这个nn.AdaptiveAvgPool2d((None,1))也有问题。
发布于 2020-06-30 21:48:30
层
nn.AdaptiveAvgPool2d((None,1))。
None实际上是导致错误的原因;我们需要将其设为静态以解决错误。您可以将“None”更改为静态值。例如:
nn.AdaptiveAvgPool2d((512,1))。
https://stackoverflow.com/questions/62152195
复制相似问题