We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,当我执行下面的代码导出onnx模型时:
import paddle.nn as nn import paddle import onnx class Net(nn.Layer): def forward(self, x): return paddle.mean(x) input_size = (2, 4, 3, 5) paddle_model = Net() paddle.set_device("cpu") input_names = "x_0" paddle_model.eval() input_spec = paddle.static.InputSpec( shape=input_size , dtype="float32", name=input_names ) mode_str = "em" paddle.onnx.export( paddle_model, mode_str, input_spec=[input_spec], opset_version=12, enable_onnx_checker=True, )
导出来的ONNX模型是这样:
由于我并没有指定paddle mean op的 axis参数,所以期望导出的onnx模型的axes attribute参数是None,不然ONNX获得的结果是错误的,并且也无法区分paddle.mean(x, axis=0)这种情况,希望可以看看。
axes
The text was updated successfully, but these errors were encountered:
jiangjiajun
No branches or pull requests
你好,当我执行下面的代码导出onnx模型时:
导出来的ONNX模型是这样:
由于我并没有指定paddle mean op的 axis参数,所以期望导出的onnx模型的
axes
attribute参数是None,不然ONNX获得的结果是错误的,并且也无法区分paddle.mean(x, axis=0)这种情况,希望可以看看。The text was updated successfully, but these errors were encountered: