Export Model from Matlab To ONNX

17 次查看(过去 30 天)
Abolfazl Nejatian
Abolfazl Nejatian 2023-7-30
评论: Jiangyin 2024-4-24,20:01
I am currently working on a multi-label image classification project in MATLAB and python.
I have developed a custom binary cross entropy loss layer. To extend the functionality of my model i use Python and try to export model with the ONNX framework.
However, I have encountered a notable discrepancy between the results obtained from MATLAB and ONNX. Despite my efforts to ensure proper conversion and preservation of model integrity, the outputs obtained through ONNX differ from the ones achieved within MATLAB.
the below example is what exactly i try to export.
a multi-label image classification using deep learning tutorial found at the following link: https://www.mathworks.com/help/deeplearning/ug/multilabel-image-classification-using-deep-learning.html
i think the diffrences between Matlab and ONNX rised from the CustomBinaryCrossEntropyLossLayer.
Thank you in advance for any guidance to solve this problem.
  1 个评论
Jiangyin
Jiangyin 2024-4-24,20:01
Hi Abolfazl,
Sorry that I'm a bit confused over what's your workflow.
Did you create a CustomBinaryCrossEntropyLossLayer in Python, export it to ONNX file, and import in MATLAB.
or
create a CustomBinaryCrossEntropyLossLayer in MATLAB, export the model to ONNX file, and import in Python?
For either workflow, is there any warning or error message thrown from MATLAB side?
Best,
Jiangyin

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call Python from MATLAB 的更多信息

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by