フィルターのクリア

how to create a dlarray of shape=(n,m,1)

4 ビュー (過去 30 日間)
bethel o
bethel o 2023 年 7 月 9 日
コメント済み: Katja Mogalle 2023 年 7 月 17 日
I am trying to load a tensorflow model into matlab.
I am trying to call initialize on the imported tensorflow model in matlab and I am getting this error:
-----------------------------------
Warning: Invalid input data for 'normalization_1_input'
Layer 'normalization_1_input' expects input data of size [1 40 1] and format 'UUU', but the input
data has size [1 1 40] and format 'CBT'.
----------------------------------
How can I create a dlarray of shape=(1,40,1) to pass input to the model?
  1 件のコメント
Katja Mogalle
Katja Mogalle 2023 年 7 月 17 日
To create a dlarray of size [1 40 1] with format 'UUU' you can use the following code:
X = dlarray(ones(1,40,1),'UUU');
If you are using the initialize function for dlnetworks, you can also create a networkDataLayout object as follows:
X = networkDataLayout([1 40 1],'UUU');
net = initialize(net,X);
If this doesn't resolve your issue, could you share your model please?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCustom Training Loops についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by