tensorflow-onnx icon indicating copy to clipboard operation
tensorflow-onnx copied to clipboard

ERROR - Unsupported ops: Counter({'SigmoidGrad': 2, 'StridedSliceGrad': 1})

Open goncaloLopesMarques opened this issue 2 years ago • 6 comments

Bug Description I´m trying to convert a saved model to oonx file with this command line "python -m tf2onnx.convert --saved-model "input path" --output "output path My_Class_Model.onnx" --opset 15"

and give me this errors:

ERROR - Unsupported ops: Counter({'SigmoidGrad': 2, 'StridedSliceGrad': 1}) ERROR - Tensorflow op [StatefulPartitionedCall/gradient_tape/grad_cam__class/model/Head_fc/swish_activation_1/Sigmoid/SigmoidGrad: SigmoidGrad] is not supported ERROR - Tensorflow op [StatefulPartitionedCall/gradient_tape/grad_cam__class/model/Head_out_fc/Sigmoid/SigmoidGrad: SigmoidGrad] is not supported

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 pro
  • Tensorflow Version: 2.2.0
  • Python version: 3.7.7

To Reproduce Describe steps/code to reproduce the behavior. Please upload/link the model you are trying to convert if possible.

Screenshots

error1 error2

.

goncaloLopesMarques avatar May 02 '22 14:05 goncaloLopesMarques

These 2 ops are not supported yet and there is no plan so far.

fatcat-z avatar May 06 '22 07:05 fatcat-z

@fatcat-z and no custom domain to add to custom ops? nothing? any tutorial to add this ops?

goncaloLopesMarques avatar May 11 '22 11:05 goncaloLopesMarques

@fatcat-z Jay Zhang FTE and no custom domain to add to custom ops? nothing? any tutorial to add this ops?

These 2 ops are TensorFlow op so we don't add them as a custom op. You can convert them to ONNX op with the default domain.

Please feel free to refer to https://github.com/onnx/tensorflow-onnx/pull/253/files for how to convert a TensorFlow op to an ONNX op.

fatcat-z avatar May 17 '22 08:05 fatcat-z

Ideally, these ***Grad ops should not exist after we freeze the graph. Will take a look.

fatcat-z avatar Jul 08 '22 12:07 fatcat-z

Hi @goncaloLopesMarques , could you share your example save_model or micro reproduction code then we can help to see what happened?

hwangdeyu avatar Aug 08 '22 08:08 hwangdeyu

Hi I have the same problem when I convert my model from frozen graph to ONNX, could anyone spot out the differences between 2 sigmoid please?

ảnh my model ảnh my sample

thomasjeff0420 avatar Dec 26 '23 04:12 thomasjeff0420