Could anyone help me how to train the neural network model for regression, clustering using the inputs and targets as specified.
2 次查看(过去 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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File 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!