BUG|tensorflow模型转换为onnx

问题:

onnx.onnx_cpp2py_export.checker.ValidationError: Unrecognized attribute: spatial for operator BatchNormalization

==> Context: Bad node spec: input: "conv0" input: "bn0_gamma" input: "bn0_beta" input: "bn0_moving_mean" input: "bn0_moving_var" output: "bn0" name: "bn0" op_type: "BatchNormalization" attribute { name: "epsilon" f: 2e-05 type: FLOAT } attribute { name: "momentum" f: 0.9 type: FLOAT } attribute { name: "spatial" i: 0 type: INT }

原因:

onnx版本不对,应该为1.2.1

你可能感兴趣的:(BUG|tensorflow模型转换为onnx)