进行 rn50 model-arch 转 onnx 的时候会报如下错误:
Traceback (most recent call last):
File "/data/yjn/anaconda3/envs/lmdrive/lib/python3.8/site-packages/torch/onnx/utils.py", line 1703, in _export
_C._check_onnx_proto(proto)
RuntimeError: Unrecognized attribute: axes for operator ReduceMean
==> Context: Bad node spec for node. Name: /visual/attnpool/ReduceMean OpType: ReduceMean
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "cn_clip/deploy/pytorch_to_onnx.py", line 139, in
torch.onnx.export(model,
File "/data/yjn/anaconda3/envs/lmdrive/lib/python3.8/site-packages/torch/onnx/utils.py", line 516, in export
_export(
File "/data/yjn/anaconda3/envs/lmdrive/lib/python3.8/site-packages/torch/onnx/utils.py", line 1705, in _export
raise errors.CheckerError(e) from e
torch.onnx.errors.CheckerError: Unrecognized attribute: axes for operator ReduceMean
==> Context: Bad node spec for node. Name: /visual/attnpool/ReduceMean OpType: ReduceMean
进行 rn50 model-arch 转 onnx 的时候会报如下错误: Traceback (most recent call last): File "/data/yjn/anaconda3/envs/lmdrive/lib/python3.8/site-packages/torch/onnx/utils.py", line 1703, in _export _C._check_onnx_proto(proto) RuntimeError: Unrecognized attribute: axes for operator ReduceMean
==> Context: Bad node spec for node. Name: /visual/attnpool/ReduceMean OpType: ReduceMean
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "cn_clip/deploy/pytorch_to_onnx.py", line 139, in
torch.onnx.export(model,
File "/data/yjn/anaconda3/envs/lmdrive/lib/python3.8/site-packages/torch/onnx/utils.py", line 516, in export
_export(
File "/data/yjn/anaconda3/envs/lmdrive/lib/python3.8/site-packages/torch/onnx/utils.py", line 1705, in _export
raise errors.CheckerError(e) from e
torch.onnx.errors.CheckerError: Unrecognized attribute: axes for operator ReduceMean
==> Context: Bad node spec for node. Name: /visual/attnpool/ReduceMean OpType: ReduceMean
请问应该如何解决,谢谢!