Error forming mini-batch of targets for network output "fc". Data interpreted with format "BC".

24 ビュー (過去 30 日間)
Dan
Dan 2025 年 1 月 27 日
コメント済み: Dan 2025 年 2 月 20 日
I worked on time series forecasting supportte dby Matlab. However, i first tried the sample provided by Matlab. But I got the error of Error forming mini-batch of targets for network output "fc", Data interpreted with format "BC" when I used training function -- trainnet(XTrain, TTrain, net_1,"mse",options). I appreciate for any suggestion or comment.
  3 件のコメント
Dan
Dan 2025 年 2 月 12 日
Yes, I selected the LSTM architecture and set last lasyer as lstmLayer. However, the problem is still persists. Thanks.

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

回答 (1 件)

Marcel Kreuzberg
Marcel Kreuzberg 2025 年 2 月 7 日
Hi, in the Deep Network Designer set OutputMode for lstmLayer to sequence.
  4 件のコメント
Marcel Kreuzberg
Marcel Kreuzberg 2025 年 2 月 14 日
編集済み: Marcel Kreuzberg 2025 年 2 月 14 日
Hi Dan,
with your code I get some different error, but changing the line
XData{n} = X(1:end-1,:);
the code is running without error on my MATLAB R2024b System.
As I tried the matlab example time-series-forecasting-using-deep-network-designer the first time I also got the Error:
Error forming mini-batch of targets for network output "fc". Data interpreted with format "BC".
During checking the problem I observed that the analyse network output was different then the described one:
In the Activations TAB the "x 1(T)" are missing for the layer 2 to 4. But after change the OutPutMode of the lstm layer to sequence
the output of the analyze fit now the one in the sample an the code was running fine.
regards
Marcel
Dan
Dan 2025 年 2 月 20 日
Hi, Marcel,
Yes, you are right. After I changed the OutPutModel to "sequence", the network works correctly. Thank you very much for your help.
Best regards,
Dan

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

カテゴリ

Help Center および File ExchangeBuilt-In Training についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by