Could anyone help me how to train the neural network model for regression, clustering using the inputs and targets as specified.

1 次查看(过去 30 天)
my inputs = 15×1 cell array
{2×1 double}
{2×1 double}
{2×1 double}
{2×1 double}
{2×1 double}
{2×2 double}
{2×2 double}
{2×2 double}
{2×2 double}
{2×2 double}
{2×3 double}
{2×3 double}
{2×3 double}
{2×3 double}
{2×3 double}
my targets =
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 1 0
1 2 0
2 1 0
2 1 0
1 2 0
1 2 2
2 1 1
1 3 2
1 1 2
2 2 1
I tried with the follwoing code
load inputs
load targets
inputSize = 2;
numHiddenUnits = 100;
numClasses = 3;
layers = [ ...
sequenceInputLayer(inputSize)
fullyConnectedLayer(3)
reluLayer
regressionLayer]
maxEpochs = 70;
miniBatchSize = 27;
options = trainingOptions('adam', ...
'ExecutionEnvironment','cpu', ...
'MaxEpochs',maxEpochs, ...
'MiniBatchSize',miniBatchSize, ...
'GradientThreshold',1, ...
'Verbose',false, ...
'Plots','training-progress');
net = trainNetwork(inputs,targets,layers,options);
But it results in error .
Could anyone please help me to overcome it.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by