Code generation for Image3DInputLayer

How to convert Image3DInputLayer to C++ ? I got error message that it is not supported for mkldnn target. Is there any alternative way?

回答 (1 件)

Abhipsa
Abhipsa 2025 年 6 月 9 日

1 投票

Hello @Lin,
For performing the code generation for “image3dInputLayer”, you can replace “image3dInputLayer” with “imageInputLayer” and manually reshape or handle the data appropriately.
For example, let’s say we are having the below code snippet using “image3dInputLayer”:
image3dInputLayer([32 32 16 4], 'Name', 'input')
Since “ imageInputLayer” does not support 4D inputs, there is a need to combine depth and channels into a single dimension, thus, depth × channels = 16 × 4 = 64.
imageInputLayer([32 32 64], 'Name', 'input', 'Normalization', 'none')
You can refer to the below MATLAB documentation for code generation of “dlnetwork”:
I hope this helps.

カテゴリ

ヘルプ センター および File ExchangeMATLAB Coder についてさらに検索

製品

リリース

R2020b

質問済み:

Lin
2021 年 1 月 12 日

回答済み:

2025 年 6 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by