Exporting Matlab trained CNN model to ONNX Problem

4 ビュー (過去 30 日間)
Andrea Daou
Andrea Daou 2021 年 7 月 12 日
回答済み: Sutanu Maiti 2021 年 8 月 5 日
Hello,
I exported CNN .mat file to .onnx using exportONNXNetwork function so I can use it with tensorflow-lite for android use.
The ONNX model now has an input size shape of 3 x 224 x 224 (when I visualize the model using Netron - image attached) instead of 224 x 224 x 3 (Matlab model architecture) :
error : The input tensor should have dimensions 1 x height x width x 3. Got 1 x 3 x 224 x 224.
Is there any solution to fix this problem so i can use the CNN onnx model for image classification prediction in tflite?
p.s: I think that all the layers dimensionality are inversed not only the input layer shape.
Thank you!

回答 (1 件)

Sutanu Maiti
Sutanu Maiti 2021 年 8 月 5 日
MATLAB trained CNN models and be exported and saved as a .mat and can directly be used for deploymnet on Android device by using "Simulink support package for Android devices".
You may have a look at the example below:

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by