Skip to content

ERROR - tf2onnx.tfonnx: Failed to convert node 'Mean' #1974

Open
@heiyuxiaokai

Description

@heiyuxiaokai

When I convert the delf model to onnx in tf2,
python -m tf2onnx.convert --saved-model ./ --opset 11 --output model.onnx --verbose
this error occurs:
2022-06-20 21:18:17,083 - VERBOSE - tf2onnx.tfonnx: Mapping TF node to ONNX node(s)
2022-06-20 21:18:17,157 - ERROR - tf2onnx.tfonnx: Failed to convert node 'Mean' (fct=<bound method ReduceOpBase.version_11 of <class 'tf2onnx.onnx_opset.reduction.ReduceOpBase'>>)
OP=ReduceMean\nName=Mean\nInputs:\n\tPow:0=Pow, [1, -1, -1, 2048], 1\n\tmean_reduction_indices_0:0=Placeholder, [2], 6\nOutpus:\n\tMean:0=None, 1
Traceback (most recent call last):
ValueError: get tensor value: 'mean_reduction_indices_0' must be Const

All opset versions have been tried.

Metadata

Metadata

Assignees

No one assigned

    Labels

    potential bugError in codebase may cause a bug, but no concrete examples observed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions