Error when training neural network with multi feature inputs

10 ビュー (過去 30 日間)
Mathieu Chêne
Mathieu Chêne 2022 年 3 月 7 日
コメント済み: Muhammad 2025 年 5 月 16 日
Hi,
I am currently working on a project in which I use a neural network with 3 feature inputs. The first one (localPosScore) is a 1x9 vectors and the others (msgX) are 1x7 vectors :
I create an arrayDatastore from a cell array with my training datas and the read function gives me this result :
However when I use the trainNetwork function the command answers me this error
Error using trainNetwork (line 184)
Input datastore returned more than one observation per row for network input 1.
I don't where I miss something because when I read the trainNetwork's help page I have a cell array of {numInputs+1} elements with a categorical label.
May you help me to solve this probem ?
Thanks in advance
Mathieu
  3 件のコメント
YOUNGWOO AN
YOUNGWOO AN 2024 年 2 月 14 日
Did you solve this problem?
Muhammad
Muhammad 2025 年 5 月 16 日
This is how i fixed this probelm:
this was my before datastore
>> preview(combined_ds)
ans =
1×4 cell array
{32×32 uint8} {32×32 uint8} {1×80 double} {1×1 cell}
you can see that the linear layer has size 1x80.. this is causing the problem.. try to make it 80x1.. this will solve the problem..

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

採用された回答

Prince Kumar
Prince Kumar 2022 年 3 月 31 日

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by