Deep Neural Network Training (Non-Image Classification)
조회 수: 5 (최근 30일)
이전 댓글 표시
Dear MATLAB Community,
I'm tying to train a Neural Network for Non-Image Classification task:
- I have a table 30x14 called Dataset containing 13 Columns which are the Features and the last column (14th) has the labels.
- Each Row in Dataset is one example.
- I also have the features saved as a 30x13 Matrix called "features" containg the features and a 30x1 Matrix called "labels" containing the labels.
- I also build an architecture using Deep Neural Network Designer Application in MATLAB and saved my architecture in a variable called "layers".
- I need to build and train a neural network for classifying future examples and assess the accuray of my model.
- I have options set as
options = trainingOptions('sgdm', ...
'MaxEpochs',20,...
'InitialLearnRate',1e-4, ...
'Verbose',false, ...
'Plots','training-progress');
Attempts:
(1) net = trainNetwork(Dataset,layers,options)
(2) net = trainNetwork(features,labels,layers,options)
Both attemps failed and gave errors
(1)
Error using trainNetwork (line 165)
Invalid training data table for classification. Predictors must be in the first column of
the table, as a cell array of image paths or images. Responses must be after the first
column, as categorical labels.
(2)
Error using trainNetwork (line 165)
Too many input arguments.
Caused by:
Error using trainNetwork>iParseInputArguments (line 290)
Too many input arguments.
Anyone has any idea what to do ?
Thank You
댓글 수: 0
답변 (1개)
JESUS DAVID ARIZA ROYETH
2019년 11월 14일
example:
[x,t] = iris_dataset; %x is 4x150 (4 features,150 samples) , y is 3x150 (3 total labels,150 samples)
net = patternnet(10);%create net
net = train(net,x,t);%train net
view(net)
y = net(x);%evaluate net
perf = perform(net,t,y);%test performance
classes = vec2ind(y);%all net outputs
futureclassification=vec2ind(net([6.7 3.1 5.6 2.4]'))%your future data here
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!