onnx / tensorflow-onnx

Convert TensorFlow, Keras, Tensorflow.js and Tflite models to ONNX
Apache License 2.0
2.3k stars 432 forks source link

Convert prelu to other five basic operators #2341

Open salanzewei opened 3 months ago

salanzewei commented 3 months ago

Ask a Question

Question

My original model is model.h5,firstly I convert h5 to saved model format, then I conver saved model to onnx use tf2onnx .After this,The prelu op is split into five basic ops. How can I avoid being split? My tf2onnx version is 1.16.1,the first image is prelu in h5 model, the second image is prelu after tf2onnx convert.

捕获9 image

fatcat-z commented 1 month ago

In general, TF op Prelu will be replaced with ONNX op Prelu directly. No idea why this happened to your model.

Could you please share the model.h5 for a further debug?