Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

eras conversion to ONNX

I have my trained keras model and I am trying to convert it into ONNX format to use it in Unity but I constantly get errors anyone could help:

`import tensorflow.keras as keras
import onnx
import keras2onnx

model = keras.models.load_model(‘b_model.h5’)
onnx_model = keras2onnx.convert.convert(model, model.name)
onnx.save_model(onnx_model, ‘onnx_model.onnx’)`

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

The error is as follow: AttributeError: module ‘tensorflow.python.keras’ has no attribute ‘applications’ I have all installations updated etc

>Solution :

Keras2onnx is deprected.

Please use tf2onnx

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading